mirror of
https://gitee.com/krxd/shuyuan.git
synced 2026-04-08 13:25:54 +08:00
修改bug
This commit is contained in:
@@ -22,4 +22,4 @@ VITE_REQUEST_HEADER_SITEID_KEY='site-id'
|
|||||||
VITE_REQUEST_HEADER_CHANNEL_KEY='channel'
|
VITE_REQUEST_HEADER_CHANNEL_KEY='channel'
|
||||||
|
|
||||||
# 应用版本
|
# 应用版本
|
||||||
VITE_APP_VERSION='1.0.1'
|
VITE_APP_VERSION='1.0.1'
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
NODE_ENV = 'production'
|
NODE_ENV = 'production'
|
||||||
|
|
||||||
# api请求地址
|
# api请求地址
|
||||||
VITE_APP_BASE_URL=''
|
VITE_APP_BASE_URL='https://ttts.runtong.vip/api/'
|
||||||
|
|
||||||
# 图片服务器地址
|
# 图片服务器地址
|
||||||
VITE_IMG_DOMAIN=''
|
VITE_IMG_DOMAIN='https://ttts.runtong.vip'
|
||||||
|
|
||||||
# 站点id 仅在编译为小程序时生效
|
# 站点id 仅在编译为小程序时生效
|
||||||
VITE_SITE_ID = ''
|
VITE_SITE_ID = '100002'
|
||||||
|
|
||||||
# 本地存储时token的参数名
|
# 本地存储时token的参数名
|
||||||
VITE_REQUEST_STORAGE_TOKEN_KEY='wapToken'
|
VITE_REQUEST_STORAGE_TOKEN_KEY='wapToken'
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -19,4 +19,3 @@ dist
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
dist.zip
|
|
||||||
@@ -1,16 +1,20 @@
|
|||||||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
{
|
||||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||||
"version": "0.0",
|
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||||
"configurations": [{
|
"version" : "0.0",
|
||||||
"default" :
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"launchtype" : "local"
|
"default" : {
|
||||||
},
|
"launchtype" : "local"
|
||||||
"mp-weixin" :
|
},
|
||||||
{
|
"mp-weixin" : {
|
||||||
"launchtype" : "local"
|
"launchtype" : "local"
|
||||||
},
|
},
|
||||||
"type" : "uniCloud"
|
"type" : "uniCloud"
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"openVueDevtools" : true,
|
||||||
|
"type" : "uni-app:h5"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
12
package-lock.json
generated
12
package-lock.json
generated
@@ -22,7 +22,6 @@
|
|||||||
"@dcloudio/uni-mp-weixin": "3.0.0-3080720230703001",
|
"@dcloudio/uni-mp-weixin": "3.0.0-3080720230703001",
|
||||||
"@dcloudio/uni-quickapp-webview": "3.0.0-3080720230703001",
|
"@dcloudio/uni-quickapp-webview": "3.0.0-3080720230703001",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"hls.js": "^1.5.17",
|
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"image-tools": "^1.4.0",
|
"image-tools": "^1.4.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
@@ -6757,12 +6756,6 @@
|
|||||||
"he": "bin/he"
|
"he": "bin/he"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hls.js": {
|
|
||||||
"version": "1.5.18",
|
|
||||||
"resolved": "https://registry.npmmirror.com/hls.js/-/hls.js-1.5.18.tgz",
|
|
||||||
"integrity": "sha512-znxR+2jecWluu/0KOBqUcvVyAB5tLff10vjMGrpAlz1eFY+ZhF1bY3r82V+Bk7WJdk03iTjtja9KFFz5BrqjSA==",
|
|
||||||
"license": "Apache-2.0"
|
|
||||||
},
|
|
||||||
"node_modules/html-encoding-sniffer": {
|
"node_modules/html-encoding-sniffer": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz",
|
||||||
@@ -17597,11 +17590,6 @@
|
|||||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"hls.js": {
|
|
||||||
"version": "1.5.18",
|
|
||||||
"resolved": "https://registry.npmmirror.com/hls.js/-/hls.js-1.5.18.tgz",
|
|
||||||
"integrity": "sha512-znxR+2jecWluu/0KOBqUcvVyAB5tLff10vjMGrpAlz1eFY+ZhF1bY3r82V+Bk7WJdk03iTjtja9KFFz5BrqjSA=="
|
|
||||||
},
|
|
||||||
"html-encoding-sniffer": {
|
"html-encoding-sniffer": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz",
|
||||||
|
|||||||
@@ -63,7 +63,6 @@
|
|||||||
"vue": "^3.3.0",
|
"vue": "^3.3.0",
|
||||||
"vue-i18n": "^9.2.2",
|
"vue-i18n": "^9.2.2",
|
||||||
"weixin-js-sdk": "^1.6.5",
|
"weixin-js-sdk": "^1.6.5",
|
||||||
"hls.js": "^1.5.17",
|
|
||||||
"dayjs": "^1.11.13"
|
"dayjs": "^1.11.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
|
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
|
||||||
import { launchInterceptor } from '@/utils/interceptor'
|
import { launchInterceptor } from '@/utils/interceptor'
|
||||||
import { getToken, isWeixinBrowser, getSiteId, currRoute, deepClone } from '@/utils/common'
|
import { getToken, isWeixinBrowser, getSiteId, currRoute, deepClone } from '@/utils/common'
|
||||||
|
import { checkAndRequestAuth} from '@/utils/auth';
|
||||||
import useMemberStore from '@/stores/member'
|
import useMemberStore from '@/stores/member'
|
||||||
import useConfigStore from '@/stores/config'
|
import useConfigStore from '@/stores/config'
|
||||||
import useSystemStore from '@/stores/system'
|
import useSystemStore from '@/stores/system'
|
||||||
@@ -186,11 +187,12 @@
|
|||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
checkAndRequestAuth();
|
||||||
|
// #endif
|
||||||
})
|
})
|
||||||
|
|
||||||
onHide(() => {
|
onHide(() => {
|
||||||
|
|||||||
@@ -52,66 +52,6 @@
|
|||||||
<template v-if="component.componentName == 'Text'">
|
<template v-if="component.componentName == 'Text'">
|
||||||
<diy-text :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.Text" />
|
<diy-text :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.Text" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'GoodsCoupon'">
|
|
||||||
<diy-goods-coupon :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.GoodsCoupon" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'GoodsList'">
|
|
||||||
<diy-goods-list :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.GoodsList" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ManyGoodsList'">
|
|
||||||
<diy-many-goods-list :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ManyGoodsList" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ShopExchangeGoods'">
|
|
||||||
<diy-shop-exchange-goods :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ShopExchangeGoods" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ShopExchangeInfo'">
|
|
||||||
<diy-shop-exchange-info :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ShopExchangeInfo" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ShopGoodsRanking'">
|
|
||||||
<diy-shop-goods-ranking :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ShopGoodsRanking" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ShopGoodsRecommend'">
|
|
||||||
<diy-shop-goods-recommend :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ShopGoodsRecommend" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ShopMemberInfo'">
|
|
||||||
<diy-shop-member-info :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ShopMemberInfo" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ShopNewcomer'">
|
|
||||||
<diy-shop-newcomer :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ShopNewcomer" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ShopOrderInfo'">
|
|
||||||
<diy-shop-order-info :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ShopOrderInfo" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ShopSearch'">
|
|
||||||
<diy-shop-search :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ShopSearch" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'SingleRecommend'">
|
|
||||||
<diy-single-recommend :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.SingleRecommend" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FenxiaoGoodsList'">
|
|
||||||
<diy-fenxiao-goods-list :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.FenxiaoGoodsList" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ParentMember'">
|
|
||||||
<diy-parent-member :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ParentMember" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'Poster'">
|
|
||||||
<diy-poster :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.Poster" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'TtnGraphicNav'">
|
|
||||||
<diy-ttn-graphic-nav :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.TtnGraphicNav" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'GiftcardList'">
|
|
||||||
<diy-giftcard-list :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.GiftcardList" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'Dstore'">
|
|
||||||
<diy-dstore :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.Dstore" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'XypmActivity'">
|
|
||||||
<diy-xypm-activity :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.XypmActivity" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'XypmArticle'">
|
|
||||||
<diy-xypm-article :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.XypmArticle" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'ErpMemberInfo'">
|
<template v-if="component.componentName == 'ErpMemberInfo'">
|
||||||
<diy-erp-member-info :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ErpMemberInfo" />
|
<diy-erp-member-info :component="component" :global="data.global" :index="index" :pullDownRefreshCount="props.pullDownRefreshCount" :scrollBool="diyGroup.componentsScrollBool.ErpMemberInfo" />
|
||||||
</template>
|
</template>
|
||||||
@@ -124,26 +64,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import diyGoodsCoupon from '@/addon/shop/components/diy/goods-coupon/index.vue';
|
|
||||||
import diyGoodsList from '@/addon/shop/components/diy/goods-list/index.vue';
|
|
||||||
import diyManyGoodsList from '@/addon/shop/components/diy/many-goods-list/index.vue';
|
|
||||||
import diyShopExchangeGoods from '@/addon/shop/components/diy/shop-exchange-goods/index.vue';
|
|
||||||
import diyShopExchangeInfo from '@/addon/shop/components/diy/shop-exchange-info/index.vue';
|
|
||||||
import diyShopGoodsRanking from '@/addon/shop/components/diy/shop-goods-ranking/index.vue';
|
|
||||||
import diyShopGoodsRecommend from '@/addon/shop/components/diy/shop-goods-recommend/index.vue';
|
|
||||||
import diyShopMemberInfo from '@/addon/shop/components/diy/shop-member-info/index.vue';
|
|
||||||
import diyShopNewcomer from '@/addon/shop/components/diy/shop-newcomer/index.vue';
|
|
||||||
import diyShopOrderInfo from '@/addon/shop/components/diy/shop-order-info/index.vue';
|
|
||||||
import diyShopSearch from '@/addon/shop/components/diy/shop-search/index.vue';
|
|
||||||
import diySingleRecommend from '@/addon/shop/components/diy/single-recommend/index.vue';
|
|
||||||
import diyFenxiaoGoodsList from '@/addon/shop_fenxiao/components/diy/fenxiao-goods-list/index.vue';
|
|
||||||
import diyParentMember from '@/addon/tt_niucloud/components/diy/parent-member/index.vue';
|
|
||||||
import diyPoster from '@/addon/tt_niucloud/components/diy/poster/index.vue';
|
|
||||||
import diyTtnGraphicNav from '@/addon/tt_niucloud/components/diy/ttn-graphic-nav/index.vue';
|
|
||||||
import diyGiftcardList from '@/addon/shop_giftcard/components/diy/giftcard-list/index.vue';
|
|
||||||
import diyDstore from '@/addon/d_store/components/diy/dstore/index.vue';
|
|
||||||
import diyXypmActivity from '@/addon/xypm/components/diy/xypm-activity/index.vue';
|
|
||||||
import diyXypmArticle from '@/addon/xypm/components/diy/xypm-article/index.vue';
|
|
||||||
import diyErpMemberInfo from '@/addon/erp/components/diy/erp-member-info/index.vue';
|
import diyErpMemberInfo from '@/addon/erp/components/diy/erp-member-info/index.vue';
|
||||||
import topTabbar from '@/components/top-tabbar/top-tabbar.vue'
|
import topTabbar from '@/components/top-tabbar/top-tabbar.vue'
|
||||||
import useDiyStore from '@/app/stores/diy';
|
import useDiyStore from '@/app/stores/diy';
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
|
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
/***************************************************** hello world ****************************************************/
|
|
||||||
export function getHelloWorld() {
|
|
||||||
return request.get(`d_store/hello_world`)
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
/***************************************************** 经销商门店接口 ****************************************************/
|
|
||||||
export function getStoreLists(param) {
|
|
||||||
return request.get(`d_store/store/lists`, param)
|
|
||||||
}
|
|
||||||
export function getStoreInfo(id) {
|
|
||||||
return request.get(`d_store/store/info/${id}`)
|
|
||||||
}
|
|
||||||
@@ -1,335 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view :style="warpCss">
|
|
||||||
<view :style="maskLayer">
|
|
||||||
</view>
|
|
||||||
<view v-if="diyComponent.showtitle == 1"
|
|
||||||
class="flex items-center mb-[16rpx] mt-[32rpx] flex-right justify-between mr-2">
|
|
||||||
<view>
|
|
||||||
<view class="ml-4 font-bold text-[32rpx]" :style="{
|
|
||||||
color: diyComponent.titlecolor,
|
|
||||||
fontSize: diyComponent.titlesize + 'rpx',
|
|
||||||
}">{{diyComponent.titlename}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="flex items-center" @click="locationVal.repositionFn()">
|
|
||||||
<view class="text-[#4d5048]" :style="{
|
|
||||||
color: diyComponent.localcolor,
|
|
||||||
fontSize: diyComponent.localsize + 'rpx',
|
|
||||||
}">
|
|
||||||
当前位置:
|
|
||||||
</view>
|
|
||||||
<view class="text-[#4d5048] tk-sltext ml-1" :style="{
|
|
||||||
color: diyComponent.localcolor,
|
|
||||||
fontSize: diyComponent.localsize + 'rpx',
|
|
||||||
}">
|
|
||||||
{{ !systemStore.currShippingAddress ? "选择位置" : systemStore.currShippingAddress.community }}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<u-icon name="arrow-right" :color="diyComponent.localcolor" size="16"></u-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="diyComponent.showsearch == 1" class="fl items-center ml-4 mr-4 mb-2 bg-[#fcfcfc] rounded-[16rpx]"
|
|
||||||
:style="{
|
|
||||||
background: diyComponent.searchcolor,
|
|
||||||
}">
|
|
||||||
<u-input clearable v-model="keyword" focus="true" placeholder="输入门店名称快速检索" @change="reload" @blur="reload"
|
|
||||||
suffixIcon="search" suffixIconStyle="color: #909399"></u-input>
|
|
||||||
</view>
|
|
||||||
<view v-if="list&&list.length>0" class="tk-card" :style="{
|
|
||||||
background: diyComponent.cardbackground,padding:diyComponent.paddingsize + 'rpx'
|
|
||||||
}" v-for="(item, index) in list">
|
|
||||||
<view class="flex items-center" @click="redirect({url:'/addon/d_store/pages/detail?id='+item.id})">
|
|
||||||
<view>
|
|
||||||
<image style="
|
|
||||||
width: 140rpx;
|
|
||||||
height: 140rpx;
|
|
||||||
background-color: #eeeeee;
|
|
||||||
border-radius: 8px;
|
|
||||||
" :src="img(item.logo)" mode="aspectFill"></image>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="flex flex-col ml-2 w-[100%] justify-between mb-2">
|
|
||||||
<view class="font-bold tk-sltext" :style="{
|
|
||||||
color: diyComponent.storetitlecolor,
|
|
||||||
}">{{ item.name }}</view>
|
|
||||||
<view class="text-xs text-slate-500 mb-2 tk-sltext" :style="{
|
|
||||||
color: diyComponent.desctitlecolor,
|
|
||||||
}">{{item.desc}}</view>
|
|
||||||
<view class="flex justify-between">
|
|
||||||
<view class="flex items-center">
|
|
||||||
<u-tag size="mini" :bgColor="diyComponent.tagbgcolor" :borderColor="diyComponent.tagbgcolor"
|
|
||||||
:color="diyComponent.tagtextcolor" :text="item.work_time"></u-tag>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="line-box mt-2 mb-2" :style="{
|
|
||||||
background: diyComponent.linecolor,
|
|
||||||
}"></view>
|
|
||||||
<view @click="openMap(item.lat,item.lng)" class="flex justify-between mt-1">
|
|
||||||
<view class="flex items-center w-[60%]">
|
|
||||||
<view>
|
|
||||||
<u-icon name="map" size="16" :color="diyComponent.othertitlecolor"></u-icon>
|
|
||||||
</view>
|
|
||||||
<view class="ml-1 text-slate-500 tk-sltext" :style="{
|
|
||||||
color: diyComponent.othertitlecolor,
|
|
||||||
}">{{item.address}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="flex items-center text-slate-600 " :style="{
|
|
||||||
color: diyComponent.othertitlecolor,
|
|
||||||
}">
|
|
||||||
距离{{item.distance}}km
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view @click="telPhone(item.mobile)" class="flex justify-between mt-1">
|
|
||||||
<view class="flex items-center w-[60%]">
|
|
||||||
<view>
|
|
||||||
<u-icon name="phone" size="16" :color="diyComponent.othertitlecolor"></u-icon>
|
|
||||||
</view>
|
|
||||||
<view class="ml-1 text-slate-500 tk-sltext" :style="{
|
|
||||||
color: diyComponent.othertitlecolor,
|
|
||||||
}">{{item.mobile}}</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<up-loading-icon class="mt-4 mb-4" :show="loading" mode="circle" timing-function="linear"></up-loading-icon>
|
|
||||||
|
|
||||||
<mescroll-empty :option="{ icon: img('static/resource/images/empty.png') }"
|
|
||||||
v-if="!list.length && loading == false"></mescroll-empty>
|
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<!-- 小程序隐私协议 -->
|
|
||||||
<wx-privacy-popup ref="wxPrivacyPopup"></wx-privacy-popup>
|
|
||||||
<!-- #endif -->
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
computed,
|
|
||||||
watch,
|
|
||||||
onMounted,
|
|
||||||
nextTick,
|
|
||||||
getCurrentInstance,
|
|
||||||
watchEffect
|
|
||||||
} from "vue";
|
|
||||||
import { img, redirect } from "@/utils/common";
|
|
||||||
import MescrollUni from "@/components/mescroll/mescroll-uni/mescroll-uni.vue";
|
|
||||||
import MescrollBody from "@/components/mescroll/mescroll-body/mescroll-body.vue";
|
|
||||||
import useMescroll from "@/components/mescroll/hooks/useMescroll.js";
|
|
||||||
import MescrollEmpty from "@/components/mescroll/mescroll-empty/mescroll-empty.vue";
|
|
||||||
import { onLoad, onPageScroll, onReachBottom } from "@dcloudio/uni-app";
|
|
||||||
import useDiyStore from "@/app/stores/diy";
|
|
||||||
import useSystemStore from "@/stores/system";
|
|
||||||
import { getStoreLists } from "@/addon/d_store/api/store";
|
|
||||||
import { getLocationData, openMap, telPhone } from "@/addon/d_store/utils/ts/common";
|
|
||||||
import { getAddressByLatlng } from "@/app/api/system";
|
|
||||||
import { useLocation } from '@/hooks/useLocation'
|
|
||||||
const locationVal = useLocation(true);
|
|
||||||
locationVal.onLoad();
|
|
||||||
locationVal.initFn();
|
|
||||||
locationVal.refreshLocationFn();
|
|
||||||
const systemStore = useSystemStore();
|
|
||||||
const currentPosition = ref();
|
|
||||||
let list = ref<Array<Object>>([]);
|
|
||||||
let loading = ref<boolean>(false);
|
|
||||||
const page = ref(1);
|
|
||||||
const planSource = ref(4);
|
|
||||||
const actType = ref([
|
|
||||||
{ name: "所有活动", value: 4 },
|
|
||||||
{ name: "美团", value: 2 },
|
|
||||||
{ name: "饿了么", value: 3 },
|
|
||||||
]);
|
|
||||||
|
|
||||||
const keyword = ref()
|
|
||||||
const reload = (e) => {
|
|
||||||
loading.value = true;
|
|
||||||
keyword.value = e
|
|
||||||
listData.value = []
|
|
||||||
page.value = 1
|
|
||||||
getStoreListFn();
|
|
||||||
}
|
|
||||||
const listData = ref([]);
|
|
||||||
|
|
||||||
const getStoreListFn = () => {
|
|
||||||
let location = getLocationData()
|
|
||||||
if (!location) {
|
|
||||||
location = uni.getStorageSync('location')
|
|
||||||
}
|
|
||||||
loading.value = true;
|
|
||||||
let data : object = {
|
|
||||||
page: page.value,
|
|
||||||
lat: location.latitude,
|
|
||||||
lng: location.longitude,
|
|
||||||
name: keyword.value
|
|
||||||
};
|
|
||||||
getStoreLists(data)
|
|
||||||
.then((res) => {
|
|
||||||
let newArr = res.data.data as Array<Object>;
|
|
||||||
if (newArr.length == 0) {
|
|
||||||
loading.value = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: "已经没有更多数据",
|
|
||||||
icon: "none",
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}
|
|
||||||
loading.value = false;
|
|
||||||
if (page.value == 1) {
|
|
||||||
list.value = newArr;
|
|
||||||
} else {
|
|
||||||
list.value = list.value.concat(newArr);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
getStoreListFn();
|
|
||||||
watch(() => systemStore.location, (nval, oval) => {
|
|
||||||
if (nval.latitude && nval.longitude) {
|
|
||||||
loading.value = true;
|
|
||||||
listData.value = []
|
|
||||||
page.value = 1
|
|
||||||
getStoreListFn()
|
|
||||||
} else {
|
|
||||||
currentPosition.value = "定位中..."
|
|
||||||
}
|
|
||||||
}, { deep: true })
|
|
||||||
|
|
||||||
onReachBottom(() => {
|
|
||||||
page.value++
|
|
||||||
getStoreListFn();
|
|
||||||
});
|
|
||||||
|
|
||||||
const props = defineProps(["component", "index", "pullDownRefreshCount"]);
|
|
||||||
|
|
||||||
const diyStore = useDiyStore();
|
|
||||||
|
|
||||||
const diyComponent = computed(() => {
|
|
||||||
if (diyStore.mode == "decorate") {
|
|
||||||
return diyStore.value[props.index];
|
|
||||||
} else {
|
|
||||||
return props.component;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const warpCss = computed(() => {
|
|
||||||
var style = "";
|
|
||||||
style += "position:relative;";
|
|
||||||
if (diyComponent.value.componentStartBgColor) {
|
|
||||||
if (
|
|
||||||
diyComponent.value.componentStartBgColor &&
|
|
||||||
diyComponent.value.componentEndBgColor
|
|
||||||
)
|
|
||||||
style += `background:linear-gradient(${diyComponent.value.componentGradientAngle},${diyComponent.value.componentStartBgColor},${diyComponent.value.componentEndBgColor});`;
|
|
||||||
else
|
|
||||||
style +=
|
|
||||||
"background-color:" + diyComponent.value.componentStartBgColor + ";";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (diyComponent.value.componentBgUrl) {
|
|
||||||
style += `background-image:url('${img(
|
|
||||||
diyComponent.value.componentBgUrl
|
|
||||||
)}');`;
|
|
||||||
style += "background-size: cover;background-repeat: no-repeat;";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (diyComponent.value.topRounded)
|
|
||||||
style +=
|
|
||||||
"border-top-left-radius:" + diyComponent.value.topRounded * 2 + "rpx;";
|
|
||||||
if (diyComponent.value.topRounded)
|
|
||||||
style +=
|
|
||||||
"border-top-right-radius:" + diyComponent.value.topRounded * 2 + "rpx;";
|
|
||||||
if (diyComponent.value.bottomRounded)
|
|
||||||
style +=
|
|
||||||
"border-bottom-left-radius:" +
|
|
||||||
diyComponent.value.bottomRounded * 2 +
|
|
||||||
"rpx;";
|
|
||||||
if (diyComponent.value.bottomRounded)
|
|
||||||
style +=
|
|
||||||
"border-bottom-right-radius:" +
|
|
||||||
diyComponent.value.bottomRounded * 2 +
|
|
||||||
"rpx;";
|
|
||||||
return style;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 背景图加遮罩层
|
|
||||||
const maskLayer = computed(() => {
|
|
||||||
var style = "";
|
|
||||||
if (diyComponent.value.componentBgUrl) {
|
|
||||||
style += "position:absolute;top:0;width:100%;";
|
|
||||||
style += `background: rgba(0,0,0,${diyComponent.value.componentBgAlpha / 10
|
|
||||||
});`;
|
|
||||||
style += `height:${height.value}px;`;
|
|
||||||
|
|
||||||
if (diyComponent.value.topRounded)
|
|
||||||
style +=
|
|
||||||
"border-top-left-radius:" + diyComponent.value.topRounded * 2 + "rpx;";
|
|
||||||
if (diyComponent.value.topRounded)
|
|
||||||
style +=
|
|
||||||
"border-top-right-radius:" + diyComponent.value.topRounded * 2 + "rpx;";
|
|
||||||
if (diyComponent.value.bottomRounded)
|
|
||||||
style +=
|
|
||||||
"border-bottom-left-radius:" +
|
|
||||||
diyComponent.value.bottomRounded * 2 +
|
|
||||||
"rpx;";
|
|
||||||
if (diyComponent.value.bottomRounded)
|
|
||||||
style +=
|
|
||||||
"border-bottom-right-radius:" +
|
|
||||||
diyComponent.value.bottomRounded * 2 +
|
|
||||||
"rpx;";
|
|
||||||
}
|
|
||||||
|
|
||||||
return style;
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.pullDownRefreshCount,
|
|
||||||
(newValue, oldValue) => {
|
|
||||||
// 处理下拉刷新业务
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
refresh();
|
|
||||||
getStoreListFn();
|
|
||||||
// 装修模式下刷新
|
|
||||||
if (diyStore.mode == "decorate") {
|
|
||||||
watch(
|
|
||||||
() => diyComponent.value,
|
|
||||||
(newValue, oldValue) => {
|
|
||||||
if (newValue && newValue.componentName == "RichText") {
|
|
||||||
refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const instance = getCurrentInstance();
|
|
||||||
const height = ref(0);
|
|
||||||
|
|
||||||
const refresh = () => {
|
|
||||||
nextTick(() => {
|
|
||||||
const query = uni.createSelectorQuery().in(instance);
|
|
||||||
query
|
|
||||||
.select(".diy-rich-text")
|
|
||||||
.boundingClientRect((data : any) => {
|
|
||||||
height.value = data.height;
|
|
||||||
})
|
|
||||||
.exec();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
@import "@/addon/d_store/utils/styles/common.scss";
|
|
||||||
|
|
||||||
.uni-system-open-location {
|
|
||||||
z-index: 99999999;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
{}
|
|
||||||
|
|
||||||
@@ -1,279 +0,0 @@
|
|||||||
<template>
|
|
||||||
|
|
||||||
<view class="bg-[#fafafa] min-h-[100vh] " v-if="detailData">
|
|
||||||
<view class="tk-card1">
|
|
||||||
<u-swiper :list="detailData.banner" :indicator="true" :autoplay="true" height="480rpx" @click="swiperClick"
|
|
||||||
radius="8"></u-swiper>
|
|
||||||
</view>
|
|
||||||
<view class="tk-card">
|
|
||||||
<view class="title">{{detailData.name}}</view>
|
|
||||||
<view class="text-xs text-[#868686]">{{detailData.desc}}</view>
|
|
||||||
<view class="flex justify-between mt-1">
|
|
||||||
<view class="flex items-center">
|
|
||||||
<u-tag size="mini" bgColor="#6e6f59" borderColor="#867d44" :text="detailData.work_time"></u-tag>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="line-box mt-2 mb-2"></view>
|
|
||||||
<view class="mt-1" v-if="detailData.contact_name!=''">
|
|
||||||
<view class="font-bold">门店联系人</view>
|
|
||||||
<view class="flex items-center ">
|
|
||||||
<view class="text-slate-500 tk-sltext">{{detailData.contact_name}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view @click="telPhone(detailData.mobile)" class="mt-1">
|
|
||||||
<view class="font-bold">门店电话</view>
|
|
||||||
<view class="flex items-center ">
|
|
||||||
<view class="text-slate-500 tk-sltext">{{detailData.mobile}}</view>
|
|
||||||
<view class="flex items-center ml-2">
|
|
||||||
<view>
|
|
||||||
<u-icon name="phone" size="20" color="#252b34"></u-icon>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
拨打
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view @click="openMap(detailData.lat,detailData.lng)" class="flex items-center justify-between mt-1">
|
|
||||||
<view class="w-70%">
|
|
||||||
<view class="font-bold">门店地址</view>
|
|
||||||
<view class="text-slate-500 mt-1">{{detailData.address}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="flex w-[30%] justify-end">
|
|
||||||
<view class="flex flex-col items-center ">
|
|
||||||
<view>
|
|
||||||
<u-icon name="map" size="22" color="#000000"></u-icon>
|
|
||||||
</view>
|
|
||||||
<view>地图</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="tk-card">
|
|
||||||
<view class="mb-2 font-bold">门店详情</view>
|
|
||||||
<u-parse :content="detailData.content"
|
|
||||||
:tagStyle="{img: 'vertical-align: top;',p:'overflow: hidden;word-break:break-word;' }"></u-parse>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<u-safe-bottom></u-safe-bottom>
|
|
||||||
<view class="tab-bar-placeholder"></view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<tabbar addon="app" />
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<!-- 小程序隐私协议 -->
|
|
||||||
<wx-privacy-popup ref="wxPrivacyPopup"></wx-privacy-popup>
|
|
||||||
<!-- #endif -->
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, computed } from 'vue'
|
|
||||||
import { useShare } from '@/hooks/useShare'
|
|
||||||
import { getStoreInfo } from '@/addon/d_store/api/store'
|
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
|
||||||
import { useLogin } from '@/hooks/useLogin';
|
|
||||||
import { imgListPreview, openMap, telPhone } from '@/addon/d_store/utils/ts/common'
|
|
||||||
import useMemberStore from '@/stores/member'
|
|
||||||
import { img, redirect, handleOnloadParams } from "@/utils/common";
|
|
||||||
const tabshow = ref(true)
|
|
||||||
const memberStore = useMemberStore()
|
|
||||||
const userInfo = computed(() => memberStore.info)
|
|
||||||
const { setShare, onShareAppMessage, onShareTimeline } = useShare()
|
|
||||||
setShare();
|
|
||||||
onShareAppMessage()
|
|
||||||
onShareTimeline()
|
|
||||||
const loading = ref(false)
|
|
||||||
const detailData = ref()
|
|
||||||
const getDetailInfoEvent = async (id) => {
|
|
||||||
const res = await getStoreInfo(id)
|
|
||||||
detailData.value = res.data
|
|
||||||
detailData.value.banner.forEach((item, index) => {
|
|
||||||
detailData.value.banner[index] = img(item)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const swiperClick = (index) => {
|
|
||||||
if (typeof index == 'number')
|
|
||||||
imgListPreview(detailData.value.banner, index)
|
|
||||||
}
|
|
||||||
//预览图片
|
|
||||||
const imgListPreview = (item : any, index : any) => {
|
|
||||||
if (Array.isArray(item)) {
|
|
||||||
if (!item.length) return false
|
|
||||||
var urlList = item;
|
|
||||||
uni.previewImage({
|
|
||||||
indicator: "number",
|
|
||||||
current: index,
|
|
||||||
loop: true,
|
|
||||||
urls: urlList
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
if (item === '') return false
|
|
||||||
var urlList = []
|
|
||||||
urlList.push(img(item)) //push中的参数为 :src="item.img_url" 中的图片地址
|
|
||||||
uni.previewImage({
|
|
||||||
indicator: "number",
|
|
||||||
loop: true,
|
|
||||||
urls: urlList
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
onLoad((option) => {
|
|
||||||
if (option.id) {
|
|
||||||
getDetailInfoEvent(option.id)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
@import '@/addon/d_store/utils/styles/common.scss';
|
|
||||||
|
|
||||||
|
|
||||||
.b-tabbar {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 12rpx;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
margin: 0rpx 24rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
padding: 12rpx;
|
|
||||||
background: rgba(245, 250, 245, 0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.b-tabbar-back {
|
|
||||||
background: rgba(245, 250, 245, 0.9);
|
|
||||||
box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.5), 2px 2px 4px rgba(0, 0, 0, 0.5);
|
|
||||||
border-radius: 12rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
page {
|
|
||||||
background: white;
|
|
||||||
padding-top: 24rpx;
|
|
||||||
padding-bottom: calc((constant(safe-area-inset-bottom) / 2) + 128rpx);
|
|
||||||
padding-bottom: calc((env(safe-area-inset-bottom) / 2) + 128rpx);
|
|
||||||
}
|
|
||||||
|
|
||||||
swiper {
|
|
||||||
margin: 0 30rpx;
|
|
||||||
height: 565rpx;
|
|
||||||
|
|
||||||
swiper-item,
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .uni-swiper-dots {
|
|
||||||
right: 30rpx;
|
|
||||||
left: unset;
|
|
||||||
transform: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .uni-swiper-dot {
|
|
||||||
width: 10rpx;
|
|
||||||
height: 10rpx;
|
|
||||||
background: rgba(255, 255, 255, 0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .uni-swiper-dot-active {
|
|
||||||
width: 27rpx;
|
|
||||||
border-radius: 32rpx;
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
color: #333333;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.price {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #FF3D3D;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
font-size: 24rpx;
|
|
||||||
content: '¥';
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
font-size: 24rpx;
|
|
||||||
content: '起';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.details {
|
|
||||||
margin: 0 32rpx;
|
|
||||||
padding: 30rpx;
|
|
||||||
background: #F9F9F9;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #666666;
|
|
||||||
line-height: 42rpx;
|
|
||||||
margin-top: 28rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom {
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
gap: 22rpx;
|
|
||||||
width: 100vw;
|
|
||||||
position: fixed;
|
|
||||||
background: white;
|
|
||||||
padding: 0 30rpx;
|
|
||||||
padding-bottom: calc(constant(safe-area-inset-bottom) / 2);
|
|
||||||
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
|
|
||||||
|
|
||||||
.agency,
|
|
||||||
.buy {
|
|
||||||
flex: 1;
|
|
||||||
height: 88rpx;
|
|
||||||
margin: 10rpx 0;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
border: 2rpx solid #2EA7E0;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #2EA7E0;
|
|
||||||
line-height: 88rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.buy {
|
|
||||||
color: white;
|
|
||||||
background: #2EA7E0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tk-card1 {
|
|
||||||
background-color: rgba(255, 255, 255, 0.9);
|
|
||||||
margin: 24rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
|
|
||||||
box-shadow: 0 1px 1px 0 rgba(234, 234, 234, 0.2), 0 2px 2px 0 rgba(231, 231, 231, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tk-card {
|
|
||||||
background-color: rgba(255, 255, 255, 0.9);
|
|
||||||
margin: 24rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
padding: 24rpx;
|
|
||||||
box-shadow: 0 1px 1px 0 rgba(234, 234, 234, 0.2), 0 2px 2px 0 rgba(231, 231, 231, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-bar-placeholder {
|
|
||||||
padding-bottom: calc(constant(safe-area-inset-bottom) + 100rpx);
|
|
||||||
padding-bottom: calc(env(safe-area-inset-bottom) + 100rpx);
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-container {
|
|
||||||
position: relative;
|
|
||||||
z-index: 9999;
|
|
||||||
/* 确保地图容器在最顶层 */
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,226 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="detail-box">
|
|
||||||
<view class="flex items-center mb-[16rpx] mt-[32rpx] flex-right justify-between mr-2">
|
|
||||||
<view>
|
|
||||||
<view class="ml-4 font-bold text-[36rpx]">附近门店 </view>
|
|
||||||
</view>
|
|
||||||
<view class="flex items-center" @click="locationVal.repositionFn()">
|
|
||||||
<view class="text-[#4d5048]"> 当前位置: </view>
|
|
||||||
<view class="text-[#4d5048] tk-sltext ml-1">
|
|
||||||
{{
|
|
||||||
!systemStore.currShippingAddress
|
|
||||||
? "选择位置"
|
|
||||||
: systemStore.currShippingAddress.community
|
|
||||||
}}
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<u-icon name="arrow-right" color="#4d5048" size="18"></u-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="tk-card fl items-center">
|
|
||||||
<u-input clearable v-model="keyword" placeholder="输入门店名称快速搜索" @change="reload()"></u-input>
|
|
||||||
</view>
|
|
||||||
<view v-if="list && list.length > 0" class="tk-card" v-for="(item, index) in list">
|
|
||||||
<view class="flex items-center" @click="redirect({ url: '/addon/d_store/pages/detail?id=' + item.id })">
|
|
||||||
<view>
|
|
||||||
<image style="
|
|
||||||
width: 140rpx;
|
|
||||||
height: 140rpx;
|
|
||||||
background-color: #eeeeee;
|
|
||||||
border-radius: 8px;
|
|
||||||
" :src="img(item.logo)" mode="aspectFill"></image>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="flex flex-col ml-2 w-[100%] justify-between mb-2">
|
|
||||||
<view class="font-bold tk-sltext">{{ item.name }}</view>
|
|
||||||
<view class="text-xs text-slate-500 mb-2 tk-sltext">{{
|
|
||||||
item.desc
|
|
||||||
}}</view>
|
|
||||||
<view class="flex justify-between">
|
|
||||||
<view class="flex items-center">
|
|
||||||
<u-tag size="mini" bgColor="#6e6f59" borderColor="#867d44" :text="item.work_time"></u-tag>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="line-box mt-2 mb-2"></view>
|
|
||||||
<view @click="openMap(item.lat, item.lng)" class="flex justify-between mt-1">
|
|
||||||
<view class="flex items-center w-[60%]">
|
|
||||||
<view>
|
|
||||||
<u-icon name="map" size="16" color="#64748B"></u-icon>
|
|
||||||
</view>
|
|
||||||
<view class="ml-1 text-slate-500 tk-sltext">{{ item.address }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="flex items-center text-slate-600">
|
|
||||||
距离{{ item.distance }}km
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view @click="telPhone(item.mobile)" class="flex justify-between mt-1">
|
|
||||||
<view class="flex items-center w-[60%]">
|
|
||||||
<view>
|
|
||||||
<u-icon name="phone" size="16" color="#64748B"></u-icon>
|
|
||||||
</view>
|
|
||||||
<view class="ml-1 text-slate-500 tk-sltext">{{ item.mobile }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<up-loading-icon class="mt-4 mb-4" :show="loading" mode="circle" inactive-color="#6e6f59"
|
|
||||||
timing-function="linear"></up-loading-icon>
|
|
||||||
<mescroll-empty :option="{ icon: img('static/resource/images/empty.png') }"
|
|
||||||
v-if="!list.length && loading == false"></mescroll-empty>
|
|
||||||
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<!-- 小程序隐私协议 -->
|
|
||||||
<wx-privacy-popup ref="wxPrivacyPopup"></wx-privacy-popup>
|
|
||||||
<!-- #endif -->
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, computed, watch } from "vue";
|
|
||||||
import MescrollUni from "@/components/mescroll/mescroll-uni/mescroll-uni.vue";
|
|
||||||
import MescrollBody from "@/components/mescroll/mescroll-body/mescroll-body.vue";
|
|
||||||
import useMescroll from "@/components/mescroll/hooks/useMescroll.js";
|
|
||||||
import MescrollEmpty from "@/components/mescroll/mescroll-empty/mescroll-empty.vue";
|
|
||||||
import { onLoad, onShow, onPageScroll, onReachBottom } from "@dcloudio/uni-app";
|
|
||||||
import useDiyStore from "@/app/stores/diy";
|
|
||||||
import { img, redirect, handleOnloadParams } from "@/utils/common";
|
|
||||||
const { mescrollInit, downCallback, getMescroll } = useMescroll();
|
|
||||||
import { useShare } from "@/hooks/useShare";
|
|
||||||
import { getStoreLists } from "@/addon/d_store/api/store";
|
|
||||||
import {
|
|
||||||
getLocationData,
|
|
||||||
openMap,
|
|
||||||
telPhone,
|
|
||||||
} from "@/addon/d_store/utils/ts/common";
|
|
||||||
const { setShare, onShareAppMessage, onShareTimeline } = useShare();
|
|
||||||
import { useLogin } from "@/hooks/useLogin";
|
|
||||||
import useMemberStore from "@/stores/member";
|
|
||||||
import useSystemStore from "@/stores/system";
|
|
||||||
const memberStore = useMemberStore();
|
|
||||||
const userInfo = computed(() => memberStore.info);
|
|
||||||
const systemStore = useSystemStore();
|
|
||||||
import { getAddressByLatlng } from "@/app/api/system";
|
|
||||||
import { useLocation } from "@/hooks/useLocation";
|
|
||||||
const locationVal = useLocation(true);
|
|
||||||
locationVal.onLoad();
|
|
||||||
locationVal.initFn();
|
|
||||||
const currentPosition = ref("定位中");
|
|
||||||
const keyword = ref()
|
|
||||||
let list = ref<Array<Object>>([]);
|
|
||||||
let loading = ref<boolean>(false);
|
|
||||||
|
|
||||||
const locationData = ref(uni.getStorageSync(""));
|
|
||||||
setShare();
|
|
||||||
onShareAppMessage();
|
|
||||||
onShareTimeline();
|
|
||||||
const page = ref(1);
|
|
||||||
const listData = ref([]);
|
|
||||||
const getStoreListFn = () => {
|
|
||||||
let location = getLocationData();
|
|
||||||
if (!location) {
|
|
||||||
location = uni.getStorageSync("location");
|
|
||||||
}
|
|
||||||
loading.value = true;
|
|
||||||
let data : object = {
|
|
||||||
page: page.value,
|
|
||||||
lat: location.latitude,
|
|
||||||
lng: location.longitude,
|
|
||||||
name: keyword.value
|
|
||||||
};
|
|
||||||
console.log(data)
|
|
||||||
getStoreLists(data)
|
|
||||||
.then((res) => {
|
|
||||||
let newArr = res.data.data as Array<Object>;
|
|
||||||
if (newArr.length == 0) {
|
|
||||||
loading.value = false;
|
|
||||||
uni.showToast({
|
|
||||||
title: "已经没有更多数据",
|
|
||||||
icon: "none",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
loading.value = false;
|
|
||||||
if (page.value == 1) {
|
|
||||||
list.value = newArr;
|
|
||||||
} else {
|
|
||||||
list.value = list.value.concat(newArr);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
watch(
|
|
||||||
() => systemStore.location,
|
|
||||||
(nval, oval) => {
|
|
||||||
if (nval.latitude && nval.longitude) {
|
|
||||||
loading.value = true;
|
|
||||||
listData.value = [];
|
|
||||||
page.value = 1;
|
|
||||||
getStoreListFn();
|
|
||||||
} else {
|
|
||||||
currentPosition.value = "定位中...";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ deep: true }
|
|
||||||
);
|
|
||||||
const reload = (e) => {
|
|
||||||
loading.value = true;
|
|
||||||
listData.value = []
|
|
||||||
page.value = 1
|
|
||||||
getStoreListFn();
|
|
||||||
}
|
|
||||||
onReachBottom(() => {
|
|
||||||
page.value++;
|
|
||||||
getStoreListFn();
|
|
||||||
});
|
|
||||||
|
|
||||||
onLoad((option) => {
|
|
||||||
if (uni.getStorageSync("addressByLatlng")) {
|
|
||||||
currentPosition.value =
|
|
||||||
uni.getStorageSync("addressByLatlng").formatted_addresses.recommend;
|
|
||||||
}
|
|
||||||
|
|
||||||
getStoreListFn();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
@import "@/addon/d_store/utils/styles/common.scss";
|
|
||||||
|
|
||||||
.tk-sltext {
|
|
||||||
max-width: 200px; //也可以设置最大宽度
|
|
||||||
overflow: hidden; // 溢出隐藏
|
|
||||||
display: -webkit-box; // 自适应布局 弹性伸缩盒子
|
|
||||||
-webkit-box-orient: vertical; //垂直排列子元素 伸缩盒子的子元素排列
|
|
||||||
-webkit-line-clamp: 1; //最多显示几行 多出部分。。。显示
|
|
||||||
text-overflow: ellipsis; // 显示省略号
|
|
||||||
}
|
|
||||||
|
|
||||||
.class-select {
|
|
||||||
position: relative;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 28rpx;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
height: 8rpx;
|
|
||||||
background-color: #fe6d3a;
|
|
||||||
border-radius: 4rpx;
|
|
||||||
width: 90%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-container {
|
|
||||||
position: relative;
|
|
||||||
z-index: 9999;
|
|
||||||
/* 确保地图容器在最顶层 */
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,215 +0,0 @@
|
|||||||
page{
|
|
||||||
background-color: #f5f6fa;
|
|
||||||
@apply pt-4;
|
|
||||||
}
|
|
||||||
:root, page {
|
|
||||||
--primary-color:#4277c7;
|
|
||||||
--primary-color-dark: #F26F3E;
|
|
||||||
--primary-color-disabled: #FFB397;
|
|
||||||
--primary-color-light: #FFEAE2;
|
|
||||||
--page-bg-color: #f7f7f7;
|
|
||||||
--price-text-color: #e1251b;
|
|
||||||
}
|
|
||||||
.remove-border{
|
|
||||||
&::after{
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.line-box {
|
|
||||||
background-color: #e1e1e1;
|
|
||||||
height: 2rpx;
|
|
||||||
width: 100%;
|
|
||||||
}L
|
|
||||||
//css共用样式文件
|
|
||||||
.fl{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.fb{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
.font-price{
|
|
||||||
color: #19d444;
|
|
||||||
font-size: 38rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.tk-p{
|
|
||||||
color: #19d444;
|
|
||||||
font-size: 18rpx;
|
|
||||||
}
|
|
||||||
.tk{
|
|
||||||
background: linear-gradient(-90deg, #67c6d0 0%, #19d444 100%);
|
|
||||||
color: #ffffff;
|
|
||||||
padding: 0rpx 38rpx;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
margin-right: 48rpx;
|
|
||||||
line-height:54rpx;
|
|
||||||
}
|
|
||||||
.tk-btgo{
|
|
||||||
background: linear-gradient(-90deg, #67c6d0 0%, #19d444 100%);
|
|
||||||
color: #ffffff;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
margin-right: 48rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 80rpx;
|
|
||||||
}
|
|
||||||
.tk-desc{
|
|
||||||
color: #4b4b4b;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
.tktype-tag{
|
|
||||||
padding: 4rpx 8rpx;
|
|
||||||
background: linear-gradient(-90deg, #2b2b00 0%, #353528 100%);
|
|
||||||
color: aliceblue;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
font-size: 22rpx;
|
|
||||||
}
|
|
||||||
.tk-tag{
|
|
||||||
padding: 4rpx 8rpx;
|
|
||||||
background: linear-gradient(-90deg, #4596ff 30%, #3363e7 100%);
|
|
||||||
color: #ffffff;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
font-size: 22rpx;
|
|
||||||
}
|
|
||||||
.tk-dsale{
|
|
||||||
font-size:24rpx;
|
|
||||||
color: #8f8f8f;
|
|
||||||
}
|
|
||||||
.tk-dtext{
|
|
||||||
font-size:32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
// width: 640rpx; //设置宽度
|
|
||||||
// // max-width:200px; //也可以设置最大宽度
|
|
||||||
// overflow : hidden; // 溢出隐藏
|
|
||||||
// display: -webkit-box; // 自适应布局 弹性伸缩盒子
|
|
||||||
// -webkit-box-orient: vertical; //垂直排列子元素 伸缩盒子的子元素排列
|
|
||||||
// -webkit-line-clamp: 1; //最多显示几行 多出部分。。。显示
|
|
||||||
// text-overflow: ellipsis; // 显示省略号
|
|
||||||
}
|
|
||||||
.tk-sltext{
|
|
||||||
// max-width:200px; //也可以设置最大宽度
|
|
||||||
overflow : hidden; // 溢出隐藏
|
|
||||||
display: -webkit-box; // 自适应布局 弹性伸缩盒子
|
|
||||||
-webkit-box-orient: vertical; //垂直排列子元素 伸缩盒子的子元素排列
|
|
||||||
-webkit-line-clamp: 1; //最多显示几行 多出部分。。。显示
|
|
||||||
text-overflow: ellipsis; // 显示省略号
|
|
||||||
}
|
|
||||||
.tk-text{
|
|
||||||
width: 420rpx; //设置宽度
|
|
||||||
// max-width:200px; //也可以设置最大宽度
|
|
||||||
overflow : hidden; // 溢出隐藏
|
|
||||||
display: -webkit-box; // 自适应布局 弹性伸缩盒子
|
|
||||||
-webkit-box-orient: vertical; //垂直排列子元素 伸缩盒子的子元素排列
|
|
||||||
-webkit-line-clamp: 1; //最多显示几行 多出部分。。。显示
|
|
||||||
text-overflow: ellipsis; // 显示省略号
|
|
||||||
}
|
|
||||||
.tk-card{
|
|
||||||
background-color: rgba(255, 255, 255, 0.9);
|
|
||||||
margin: 24rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
padding: 24rpx;
|
|
||||||
box-shadow: 0 1px 1px 0 rgba(234, 234, 234, 0.2), 0 2px 2px 0 rgba(231, 231, 231, 0.2);
|
|
||||||
}
|
|
||||||
.tk-bottom{
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
bottom:0px;
|
|
||||||
z-index:9999;
|
|
||||||
padding: 0rpx 0rpx 24rpx 24rpx;
|
|
||||||
padding-bottom: 0;
|
|
||||||
padding-bottom: constant(safe-area-inset-bottom);
|
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
|
||||||
background-color: rgba(250, 250, 250, 0.96);
|
|
||||||
border-top-left-radius:24rpx;
|
|
||||||
border-top-right-radius:24rpx;
|
|
||||||
}
|
|
||||||
.tk-top{
|
|
||||||
height: 110rpx;
|
|
||||||
background-color: rgba(250, 250, 250, 0.0);
|
|
||||||
}
|
|
||||||
.tk-yc{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.tk-title{
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.tk-b-bottom{
|
|
||||||
padding-bottom: 18rpx;
|
|
||||||
border-bottom-style: solid;
|
|
||||||
border-bottom-width: 1rpx;
|
|
||||||
border-bottom-color: rgba(165, 165, 165, 0.2);
|
|
||||||
}
|
|
||||||
.tk-bbut{
|
|
||||||
background: linear-gradient(-90deg, #4d84dc 0%, #3b46e8 100%);
|
|
||||||
text-align: center;
|
|
||||||
width: 680rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 32rpx;
|
|
||||||
padding: 16rpx;
|
|
||||||
margin-top: 8rpx;
|
|
||||||
margin-bottom: 8rpx;
|
|
||||||
margin-left: 12rpx;
|
|
||||||
}
|
|
||||||
.tk-column{
|
|
||||||
display: flex;flex-direction: column;justify-content: space-between;
|
|
||||||
}
|
|
||||||
.tk-end{
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
.tk-orderbtn{
|
|
||||||
padding: 4rpx 8rpx;
|
|
||||||
background: linear-gradient(-90deg, rgba(33, 120, 86, 0.6) 0%, rgba(27, 88, 53, 0.6) 100%);
|
|
||||||
color: aliceblue;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
font-size: 22rpx;
|
|
||||||
}
|
|
||||||
.tagsmall {
|
|
||||||
background: linear-gradient(-90deg, rgba(33, 120, 86, 0.6) 0%, rgba(27, 88, 53, 0.6) 100%);
|
|
||||||
color: #ffffff;
|
|
||||||
padding: 4rpx 8rpx;
|
|
||||||
border-radius: 4rpx;
|
|
||||||
}
|
|
||||||
.tk-left{
|
|
||||||
padding-left: 24rpx;
|
|
||||||
padding-top: 24rpx;
|
|
||||||
padding-right: 24rpx;
|
|
||||||
}
|
|
||||||
.font-weight{
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.tk-bluecolor{
|
|
||||||
color: #1723cb;
|
|
||||||
}
|
|
||||||
.tk-balackcolor{
|
|
||||||
color: #878787;
|
|
||||||
}
|
|
||||||
.text-center{
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.common-button {
|
|
||||||
background: linear-gradient(-90deg, #67c6d0 0%, #19d444 100%);
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 24rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 28rpx;
|
|
||||||
padding: 16rpx;
|
|
||||||
margin: 24rpx;
|
|
||||||
margin-top: 48rpx;
|
|
||||||
}
|
|
||||||
.tk-butto {
|
|
||||||
background: linear-gradient(-90deg, #4d84dc 0%, #3b46e8 100%);
|
|
||||||
text-align: center;
|
|
||||||
width: 690rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 32rpx;
|
|
||||||
padding: 16rpx;
|
|
||||||
margin-top: 48rpx;
|
|
||||||
margin-bottom: 16rpx;
|
|
||||||
margin-left: 12rpx;
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"--primary-color": "#FF4142",
|
|
||||||
"--primary-help-color": "#FB7939",
|
|
||||||
"--primary-color-dark": "#F26F3E",
|
|
||||||
"--primary-color-disabled": "#FFB397",
|
|
||||||
"--primary-color-light": "#FFF4F4",
|
|
||||||
"--page-bg-color": "#f7f7f7",
|
|
||||||
"--price-text-color": "#FF4142"
|
|
||||||
}
|
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
import { img, getToken } from '@/utils/common'
|
|
||||||
|
|
||||||
import { getAddressByLatlng } from "@/app/api/system";
|
|
||||||
import useSystemStore from "@/stores/system";
|
|
||||||
const systemStore = useSystemStore();
|
|
||||||
import { useLogin } from "@/hooks/useLogin";
|
|
||||||
/**
|
|
||||||
* 获取定位信息
|
|
||||||
*/
|
|
||||||
const getLocation = (param : any = {}) => {
|
|
||||||
uni.getLocation({
|
|
||||||
type: param.type || 'gcj02',
|
|
||||||
success: res => {
|
|
||||||
const systemStore = useSystemStore()
|
|
||||||
systemStore.setLocation(res);
|
|
||||||
typeof param.success == 'function' && param.success(res);
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
typeof param.fail == 'function' && param.fail(res);
|
|
||||||
},
|
|
||||||
complete: res => {
|
|
||||||
typeof param.complete == 'function' && param.complete(res);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function authLogin() {
|
|
||||||
if (!getToken()) {
|
|
||||||
const login = useLogin();
|
|
||||||
// 第三方平台自动登录
|
|
||||||
// #ifdef MP
|
|
||||||
login.getAuthCode();
|
|
||||||
// #endif
|
|
||||||
// #ifdef H5
|
|
||||||
useLogin().setLoginBack({ url: '/addon/tk_cps/pages/diy' })
|
|
||||||
// #endif
|
|
||||||
}
|
|
||||||
return true //自动进行登录
|
|
||||||
}
|
|
||||||
export function dateChange(date) {
|
|
||||||
return new Date(date).getTime() // 将日期值转换为时间戳
|
|
||||||
}
|
|
||||||
export function timeChange(timestamp) {
|
|
||||||
const date = new Date(timestamp * 1000);
|
|
||||||
const year = date.getFullYear();
|
|
||||||
const month = date.getMonth() + 1;
|
|
||||||
const day = date.getDate();
|
|
||||||
const hours = date.getHours();
|
|
||||||
const minutes = date.getMinutes();
|
|
||||||
const seconds = date.getSeconds();
|
|
||||||
return `${hours}:${minutes}`;
|
|
||||||
}
|
|
||||||
export function timeChangeDay(timestamp) {
|
|
||||||
const date = new Date(timestamp * 1000);
|
|
||||||
const year = date.getFullYear();
|
|
||||||
const month = date.getMonth() + 1;
|
|
||||||
const day = date.getDate();
|
|
||||||
const hours = date.getHours();
|
|
||||||
const minutes = date.getMinutes();
|
|
||||||
const seconds = date.getSeconds();
|
|
||||||
return `${day} ${hours}:${minutes}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getLocationData() {
|
|
||||||
const data = uni.getStorageSync('location')
|
|
||||||
|
|
||||||
if (data) {
|
|
||||||
return data
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
getLocation()
|
|
||||||
let e = uni.getStorageSync('location')
|
|
||||||
let data = {
|
|
||||||
latlng: ''
|
|
||||||
};
|
|
||||||
if (e.latitude && e.longitude) {
|
|
||||||
data.latlng = e.latitude + ',' + e.longitude
|
|
||||||
getAddressByLatlng(data).then((res : any) => {
|
|
||||||
if (res.data && Object.keys(res.data).length) {
|
|
||||||
uni.setStorageSync('addressByLatlng', res.data);
|
|
||||||
return e
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export function telPhone(phone) {
|
|
||||||
uni.makePhoneCall({
|
|
||||||
phoneNumber: phone
|
|
||||||
})
|
|
||||||
}
|
|
||||||
export function openMap(lat, lng) {
|
|
||||||
uni.openLocation({
|
|
||||||
latitude: parseFloat(lat),
|
|
||||||
longitude: parseFloat(lng),
|
|
||||||
success: function () {
|
|
||||||
console.log('success');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function imgListPreview(item, index) {
|
|
||||||
if (Array.isArray(item)) {
|
|
||||||
// 检查数组是否为空
|
|
||||||
if (!item.length) return false;
|
|
||||||
|
|
||||||
// 使用map方法代替forEach,这样可以返回一个新的数组
|
|
||||||
const urlList = item.map(img);
|
|
||||||
|
|
||||||
// 使用uni-app的previewImage方法预览图片
|
|
||||||
uni.previewImage({
|
|
||||||
indicator: "number",
|
|
||||||
current: index, // 确保index在item数组的范围内
|
|
||||||
loop: true,
|
|
||||||
urls: urlList
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// 检查item是否为空字符串
|
|
||||||
if (item === '') return false;
|
|
||||||
|
|
||||||
// 创建包含单个图片URL的数组
|
|
||||||
const urlList = [img(item)];
|
|
||||||
|
|
||||||
// 使用uni-app的previewImage方法预览单个图片
|
|
||||||
uni.previewImage({
|
|
||||||
indicator: "number",
|
|
||||||
loop: true,
|
|
||||||
urls: urlList
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
export async function goto(url : string) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: url
|
|
||||||
})
|
|
||||||
}
|
|
||||||
export async function gotourl(url : string) {
|
|
||||||
console.log('goto跳转网站测试')
|
|
||||||
}
|
|
||||||
export async function goback() {
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 签到是否开启
|
|
||||||
export function getSignState() {
|
|
||||||
return request.get(`dailysignin/isSignInOpen`)
|
|
||||||
}
|
|
||||||
//获取签到规则
|
|
||||||
export function getSignInAwardRules() {
|
|
||||||
return request.get(`dailysignin/rewardRules`)
|
|
||||||
}
|
|
||||||
//获取累加之和
|
|
||||||
export function getAccumulationSum(data : AnyObject) {
|
|
||||||
return request.get(`dailysignin/sum`,data)
|
|
||||||
}
|
|
||||||
//是否已签到
|
|
||||||
export function checkSignInStatusApi(){
|
|
||||||
return request.get(`/dailysignin/checkSignInStatus`)
|
|
||||||
}
|
|
||||||
//签到
|
|
||||||
export function signinApi() {
|
|
||||||
return request.post(`dailysignin/signIn`)
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
{}
|
|
||||||
|
|
||||||
@@ -1,854 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="signin" :style="themeColor()">
|
|
||||||
<u-loading-page :loading="loading" loadingText="" bg-color="#f7f7f7"></u-loading-page>
|
|
||||||
<view v-show="!loading">
|
|
||||||
<block v-if="signInData.signState">
|
|
||||||
<view class="sigin-box">
|
|
||||||
<view class="sigin-bg"></view>
|
|
||||||
<view class="signin-wrap">
|
|
||||||
<view class="member-info">
|
|
||||||
<view class="headimg">
|
|
||||||
<view class="headimg-img" v-if="signInData.headimg">
|
|
||||||
<u-avatar :src="img(signInData.headimg)" :size="'100rpx'" leftIcon="none"></u-avatar>
|
|
||||||
</view>
|
|
||||||
<view v-else class="headimg-img">
|
|
||||||
<u-avatar src="" :size="'100rpx'"></u-avatar>
|
|
||||||
</view>
|
|
||||||
<view class="signin-info">
|
|
||||||
<view>
|
|
||||||
已连续签到
|
|
||||||
<text>{{ signInData.signDaysSeries }}</text>
|
|
||||||
天
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
>{{ signInData.hasSign ? "明日" : "今日" }}签到可获得{{
|
|
||||||
pointTomorrow
|
|
||||||
}}积分</view
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="point-box" @click="signIn()">
|
|
||||||
<image
|
|
||||||
:src="
|
|
||||||
img(
|
|
||||||
signInData.hasSign == 1
|
|
||||||
? '/addon/dailySignIn/signin/sign-btn-res.png'
|
|
||||||
: '/addon/dailySignIn/signin/sign-btn.png'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
mode="widthFix"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="signin-days-wrap">
|
|
||||||
<view class="signin-desc">连续签到领好礼</view>
|
|
||||||
<view class="signin-day-list">
|
|
||||||
<view class="signin-day-con">
|
|
||||||
<view class="signin-day-scroll">
|
|
||||||
<block v-for="(item, index) in signInData.showSignDays">
|
|
||||||
<view
|
|
||||||
v-if="!item.is_last"
|
|
||||||
:id="'id_' + item.day"
|
|
||||||
class="signin-day-item"
|
|
||||||
:class="{
|
|
||||||
signed:
|
|
||||||
item.day < signInData.signDaysSeries ||
|
|
||||||
(item.day == signInData.signDaysSeries &&
|
|
||||||
signInData.hasSign == 0) ||
|
|
||||||
(item.day == signInData.signDaysSeries &&
|
|
||||||
signInData.hasSign == 1),
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view class="day">第{{ item.day }}天</view>
|
|
||||||
<image
|
|
||||||
:src="img('/addon/dailySignIn/signin/sign-icon.png')"
|
|
||||||
></image>
|
|
||||||
<view class="point">{{ item.point }}积分</view>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
v-else
|
|
||||||
:id="'id_' + item.day"
|
|
||||||
class="signin-day-item last"
|
|
||||||
:class="{
|
|
||||||
signed:
|
|
||||||
item.day < signInData.signDaysSeries ||
|
|
||||||
(item.day == signInData.signDaysSeries &&
|
|
||||||
signInData.hasSign == 0) ||
|
|
||||||
(item.day == signInData.signDaysSeries &&
|
|
||||||
signInData.hasSign == 1),
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view>
|
|
||||||
<view class="day">第{{ item.day }}天</view>
|
|
||||||
<view class="point">{{ item.point }}积分</view>
|
|
||||||
</view>
|
|
||||||
<image
|
|
||||||
:src="img('/addon/dailySignIn/signin/sign-box.png')"
|
|
||||||
mode="widthFix"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="my-signin">
|
|
||||||
<view class="my-signin-title">我的签到</view>
|
|
||||||
<view class="my-signin-con">
|
|
||||||
<view class="my-signin-item">
|
|
||||||
<image
|
|
||||||
:src="img('/addon/dailySignIn/signin/sign-bg-yellow.png')"
|
|
||||||
></image>
|
|
||||||
<view class="my-signin-item-num"
|
|
||||||
>积分:{{ signInData.signPoint }}</view
|
|
||||||
>
|
|
||||||
<view>累计获得积分</view>
|
|
||||||
</view>
|
|
||||||
<view class="my-signin-item">
|
|
||||||
<image
|
|
||||||
:src="img('/addon/dailySignIn/signin/sign-bg-pink.png')"
|
|
||||||
></image>
|
|
||||||
<view class="my-signin-item-num"
|
|
||||||
>成长值:{{ signInData.signGrowth }}</view
|
|
||||||
>
|
|
||||||
<view>累计获得成长值</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="signin-rule">
|
|
||||||
<view class="signin-rule-title">签到规则</view>
|
|
||||||
<view class="signin-rule-con">
|
|
||||||
<view
|
|
||||||
class="rule-item"
|
|
||||||
v-for="(item, index) in signInData.rule"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<block v-if="index == 0">1. 每日签到奖励:</block>
|
|
||||||
<block v-else>{{
|
|
||||||
index + 1 + ". 连续签到" + item.day + "天额外奖励:"
|
|
||||||
}}</block>
|
|
||||||
<text v-if="item.point">{{ item.point + "积分 " }}</text>
|
|
||||||
<text v-if="item.growth">{{ item.growth + "成长值" }}</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="rule-item">
|
|
||||||
{{ signInData.rule.length + 1 }}.连续签到{{
|
|
||||||
signInData.cycle
|
|
||||||
}}天为一个周期,连续签到天数签满一个周期或者签到中断,将清空连签天数重新计算签到天数
|
|
||||||
</view>
|
|
||||||
<view class="rule-item">
|
|
||||||
{{ signInData.rule.length + 2 }}.
|
|
||||||
用户可在签到页每日签到一次,签到后可获得每日签到奖励;连续签到天数达到连签奖励的当天,可额外获得连签奖励
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view @touchmove.prevent.stop>
|
|
||||||
<up-popup
|
|
||||||
:show="show"
|
|
||||||
@close="close"
|
|
||||||
@open="open"
|
|
||||||
mode="center"
|
|
||||||
:round="20"
|
|
||||||
bgColor="transparent"
|
|
||||||
>
|
|
||||||
<view class="popup-box" @click="close()">
|
|
||||||
<text class="iconfont icon-close" @click="close()"></text>
|
|
||||||
<image
|
|
||||||
class="pic"
|
|
||||||
:src="img('/addon/dailySignIn/signin/bg1.png')"
|
|
||||||
></image>
|
|
||||||
<view class="popup-content">
|
|
||||||
<view class="popup-content-wrap">
|
|
||||||
<view
|
|
||||||
class="title"
|
|
||||||
v-if="
|
|
||||||
signInData.successTip.point || signInData.successTip.growth
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<text>恭喜您获得</text>
|
|
||||||
<text v-if="signInData.successTip.point">
|
|
||||||
<text class="num u-success-dark">{{
|
|
||||||
signInData.successTip.point
|
|
||||||
}}</text>
|
|
||||||
积分
|
|
||||||
</text>
|
|
||||||
<text v-if="signInData.successTip.growth">
|
|
||||||
<text class="num u-success-dark">{{
|
|
||||||
signInData.successTip.growth
|
|
||||||
}}</text>
|
|
||||||
成长值
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
<view class="desc">连续签到可获得更多奖励!</view>
|
|
||||||
</view>
|
|
||||||
<view class="other-info u-success-dark-bg" @click="close()"
|
|
||||||
>知道了</view
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</up-popup>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
<block v-else>
|
|
||||||
<up-empty text="暂未开启签到奖励" class="up-empty"></up-empty>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import {img, isWeixinBrowser, redirect} from "@/utils/common";
|
|
||||||
import useMemberStore from "@/stores/member";
|
|
||||||
import { computed, ref } from "vue";
|
|
||||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
|
||||||
import { inArray } from "@/addon/dailySignIn/utils/utils";
|
|
||||||
import {
|
|
||||||
checkSignInStatusApi,
|
|
||||||
getAccumulationSum,
|
|
||||||
getSignInAwardRules,
|
|
||||||
getSignState,
|
|
||||||
signinApi,
|
|
||||||
} from "@/addon/dailySignIn/api/signin";
|
|
||||||
const signInData = ref({
|
|
||||||
showSignDays: [{}], // 一共展示的天数
|
|
||||||
rule: [{}],
|
|
||||||
hasSign: 0, //今天是否签到
|
|
||||||
signDaysSeries: 0, //连续签到次数
|
|
||||||
MonthData: [], //本月日期信息
|
|
||||||
signList: [],
|
|
||||||
back: "", //返回页
|
|
||||||
redirect: "", //返回方式
|
|
||||||
successTip: {},
|
|
||||||
startDate: null,
|
|
||||||
endDate: null,
|
|
||||||
isActive: "", //判断点击
|
|
||||||
signState: 1,
|
|
||||||
headimg: "",
|
|
||||||
point: 0,
|
|
||||||
growth: 0,
|
|
||||||
signPoint: 0,
|
|
||||||
signGrowth: 0,
|
|
||||||
rewardRuleDay: [],
|
|
||||||
cycle: 0,
|
|
||||||
reward: {},
|
|
||||||
});
|
|
||||||
//弹出层组件 ref
|
|
||||||
const show = ref(false);
|
|
||||||
|
|
||||||
const loading = ref(false);
|
|
||||||
|
|
||||||
// 会员信息
|
|
||||||
const memberInfo = computed(() => useMemberStore().info);
|
|
||||||
|
|
||||||
const onLoadSignIn = () => {
|
|
||||||
signInData.value.headimg = signInData.value.headimg !="" ?memberInfo.value.headimg:""
|
|
||||||
setTimeout(() => {
|
|
||||||
if (!memberInfo.value) {
|
|
||||||
setTimeout(() => {
|
|
||||||
redirect({ url: "/app/pages/member/index" });
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
const onShowSignIn = () => {
|
|
||||||
getSignStateData()
|
|
||||||
getRule();
|
|
||||||
getSignPointData();
|
|
||||||
getSignGrowthData();
|
|
||||||
checkSignInStatus();
|
|
||||||
};
|
|
||||||
|
|
||||||
// 获取签到累积积分
|
|
||||||
const getSignPointData = () => {
|
|
||||||
getAccumulationSum({
|
|
||||||
accountType: "point",
|
|
||||||
fromType: "dailySignIn",
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
signInData.value.signPoint = res.data;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
// 获取签到累积成长值
|
|
||||||
const getSignGrowthData = () => {
|
|
||||||
getAccumulationSum({
|
|
||||||
accountType: "growth",
|
|
||||||
fromType: "dailySignIn",
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
signInData.value.signGrowth = res.data;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
//判断当前是否签到
|
|
||||||
const checkSignInStatus = () => {
|
|
||||||
checkSignInStatusApi().then((res) => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
signInData.value.hasSign = res.data.isSign;
|
|
||||||
signInData.value.signDaysSeries = res.data.consecutiveDays;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
// 签到是否开启
|
|
||||||
const getSignStateData = () => {
|
|
||||||
getSignState().then((res) => {
|
|
||||||
signInData.value.signState = res.data.status
|
|
||||||
getRule();
|
|
||||||
getSignPointData();
|
|
||||||
getSignGrowthData();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
//获取rule
|
|
||||||
const getRule = () => {
|
|
||||||
loading.value = true;
|
|
||||||
getSignInAwardRules().then((res) => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
let default_point = 0;
|
|
||||||
signInData.value.cycle = res.data.cycle || 0;
|
|
||||||
signInData.value.rule = res.data.data || [];
|
|
||||||
if (signInData.value.rule.length > 0) {
|
|
||||||
signInData.value.rule.forEach((item, index) => {
|
|
||||||
if (item.day == 1) {
|
|
||||||
default_point = item.point;
|
|
||||||
} else {
|
|
||||||
signInData.value.rewardRuleDay.push(parseInt(item.day));
|
|
||||||
signInData.value.reward[item.day] = item.point;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//展示7天
|
|
||||||
var showSignDays = [];
|
|
||||||
var start_day = 1;
|
|
||||||
var end_day = 7;
|
|
||||||
var total_day = res.data.cycle;
|
|
||||||
if (signInData.value.signDaysSeries > 5) {
|
|
||||||
start_day = signInData.value.signDaysSeries - 5;
|
|
||||||
}
|
|
||||||
if (total_day >= signInData.value.signDaysSeries + 1) {
|
|
||||||
end_day = signInData.value.signDaysSeries + 1;
|
|
||||||
}
|
|
||||||
if (signInData.value.signDaysSeries <= 5) {
|
|
||||||
end_day = 8 - start_day;
|
|
||||||
}
|
|
||||||
if (end_day - start_day < 7 && total_day >= start_day + 6) {
|
|
||||||
end_day = start_day + 6;
|
|
||||||
}
|
|
||||||
if (total_day == signInData.value.signDaysSeries) {
|
|
||||||
start_day = signInData.value.signDaysSeries - 6;
|
|
||||||
end_day = signInData.value.signDaysSeries;
|
|
||||||
}
|
|
||||||
for (let i = 1; i <= res.data.cycle; i++) {
|
|
||||||
if (i >= start_day && i <= end_day) {
|
|
||||||
showSignDays.push({
|
|
||||||
day: i,
|
|
||||||
is_last: 0,
|
|
||||||
point: default_point,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (showSignDays && showSignDays.length) {
|
|
||||||
showSignDays[showSignDays.length - 1]["is_last"] = 1;
|
|
||||||
}
|
|
||||||
for (let i in showSignDays) {
|
|
||||||
let item = showSignDays[i];
|
|
||||||
if (inArray(item.day, signInData.value.rewardRuleDay) != -1) {
|
|
||||||
showSignDays[i]["point"] =
|
|
||||||
parseInt(signInData.value.reward[item.day]) +
|
|
||||||
parseInt(default_point);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
signInData.value.showSignDays = showSignDays;
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
//签到
|
|
||||||
const signIn = () => {
|
|
||||||
if (signInData.value.signState == 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: "签到未开启",
|
|
||||||
});
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (!signInData.value.hasSign && signInData.value.signState == 1) {
|
|
||||||
signinApi().then((res) => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
signInData.value.successTip = res.data[0];
|
|
||||||
// 打开弹出层
|
|
||||||
show.value = true;
|
|
||||||
getRule();
|
|
||||||
getSignPointData();
|
|
||||||
getSignGrowthData();
|
|
||||||
signInData.value.hasSign = 1;
|
|
||||||
signInData.value.signDaysSeries = signInData.value.signDaysSeries + 1;
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: res.message,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const pointTomorrow = computed(() => {
|
|
||||||
var signDaysSeries = signInData.value.signDaysSeries + 1;
|
|
||||||
var point = signInData.value.rule[0].point
|
|
||||||
? parseInt(signInData.value.rule[0].point)
|
|
||||||
: 0;
|
|
||||||
for (let i = 1; i < signInData.value.rule.length; i++) {
|
|
||||||
let reward = signInData.value.rule[i];
|
|
||||||
if (reward.day == signDaysSeries && reward.point)
|
|
||||||
point += parseInt(reward.point);
|
|
||||||
}
|
|
||||||
return point;
|
|
||||||
});
|
|
||||||
const open = () => {
|
|
||||||
show.value = true;
|
|
||||||
};
|
|
||||||
const close = () => {
|
|
||||||
show.value = false;
|
|
||||||
};
|
|
||||||
// const infoFill = ref(false)
|
|
||||||
// const clickAvatar = () => {
|
|
||||||
// // #ifdef MP-WEIXIN
|
|
||||||
// infoFill.value.show = true
|
|
||||||
// // #endif
|
|
||||||
//
|
|
||||||
// // #ifdef H5
|
|
||||||
// if (isWeixinBrowser()) {
|
|
||||||
// useLogin().getAuthCode('snsapi_userinfo')
|
|
||||||
// } else {
|
|
||||||
// redirect({ url: '/app/pages/member/personal' })
|
|
||||||
// }
|
|
||||||
// // #endif
|
|
||||||
// }
|
|
||||||
const onShareAppMessage = ()=>{
|
|
||||||
var path = '/addon/dailySignIn/pages/signIn/index';
|
|
||||||
return {
|
|
||||||
title: '签到有礼,天天签到,积分好礼送不停',
|
|
||||||
imageUrl: '',
|
|
||||||
path: path,
|
|
||||||
success: res => {},
|
|
||||||
fail: res => {},
|
|
||||||
complete: res => {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
onLoad(() => {
|
|
||||||
onLoadSignIn()
|
|
||||||
onShowSignIn()
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
uni-page-body,
|
|
||||||
uni-page-refresh {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin {
|
|
||||||
position: relative;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.head-nav {
|
|
||||||
width: 100%;
|
|
||||||
height: var(--status-bar-height);
|
|
||||||
}
|
|
||||||
|
|
||||||
.head-nav.active {
|
|
||||||
padding-top: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sigin-box {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sigin-bg {
|
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1;
|
|
||||||
background: linear-gradient(136deg, #fe7849 0%, #ff1959 100%);
|
|
||||||
height: 500rpx;
|
|
||||||
border-radius: 0 0 100% 100%/0 0 20% 20%;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin-wrap {
|
|
||||||
padding: 0 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.member-info {
|
|
||||||
position: relative;
|
|
||||||
z-index: 9;
|
|
||||||
padding: 74rpx 0 55rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.headimg {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.headimg-img {
|
|
||||||
width: 100rpx;
|
|
||||||
height: 100rpx;
|
|
||||||
background: #fff;
|
|
||||||
border: 0px solid #fff;
|
|
||||||
border-radius: 50%;
|
|
||||||
overflow: hidden;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin-info {
|
|
||||||
view {
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 1;
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
margin-bottom: 18rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
text {
|
|
||||||
margin: 0 9rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.point-box {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 68rpx;
|
|
||||||
padding: 13rpx 0 13rpx 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 160rpx;
|
|
||||||
height: 68rpx;
|
|
||||||
max-height: 80rpx;
|
|
||||||
margin-bottom: -6rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.point {
|
|
||||||
margin-left: 14rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin-days-wrap {
|
|
||||||
position: relative;
|
|
||||||
z-index: 9;
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-radius: 18rpx;
|
|
||||||
padding: 30rpx 0 30rpx;
|
|
||||||
height: 468rpx;
|
|
||||||
|
|
||||||
.signin-desc {
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 1;
|
|
||||||
padding: 0 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin-day-list {
|
|
||||||
margin-top: 30rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 0 30rpx;
|
|
||||||
|
|
||||||
.signin-day-con {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin-day-scroll {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
width: 100%;
|
|
||||||
flex-direction: row;
|
|
||||||
white-space: nowrap;
|
|
||||||
line-height: 1;
|
|
||||||
|
|
||||||
.signin-day-item {
|
|
||||||
flex-shrink: 0;
|
|
||||||
background: #f5f6fa;
|
|
||||||
margin-right: 30rpx;
|
|
||||||
width: calc((100% - 90rpx) / 4);
|
|
||||||
height: 155rpx;
|
|
||||||
border-radius: 18rpx;
|
|
||||||
margin-bottom: 24rpx;
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-right: 0;
|
|
||||||
width: calc((100% - 30rpx) / 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(4n) {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 60rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.signed {
|
|
||||||
background: linear-gradient(136deg, #fe7849 0%, #ff1959 100%);
|
|
||||||
|
|
||||||
view {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.last {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
|
|
||||||
> view {
|
|
||||||
width: 50%;
|
|
||||||
|
|
||||||
.point {
|
|
||||||
margin: 15rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 40%;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
max-width: 130rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reward {
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin-day-item {
|
|
||||||
display: inline-block;
|
|
||||||
width: 85rpx;
|
|
||||||
height: 103rpx;
|
|
||||||
border-radius: 4rpx;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #f6f6fb;
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
.day {
|
|
||||||
font-size: 24rpx;
|
|
||||||
line-height: 1;
|
|
||||||
margin-top: 18rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.point {
|
|
||||||
font-size: 20rpx;
|
|
||||||
line-height: 1;
|
|
||||||
margin-top: -4rpx;
|
|
||||||
color: #abb0c1;
|
|
||||||
}
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin-btn {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 80rpx;
|
|
||||||
bottom: 40rpx;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
button {
|
|
||||||
display: inline-block;
|
|
||||||
width: 442rpx;
|
|
||||||
height: 100%;
|
|
||||||
color: #ffffff;
|
|
||||||
background-color: #ff4544;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-active {
|
|
||||||
color: #303133;
|
|
||||||
background-color: #e1e1e1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.my-signin {
|
|
||||||
padding: 30rpx;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-radius: 18rpx;
|
|
||||||
|
|
||||||
.my-signin-title {
|
|
||||||
font-size: 32rpx;
|
|
||||||
line-height: 1;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.my-signin-con {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.my-signin-item {
|
|
||||||
width: 300rpx;
|
|
||||||
height: 155rpx;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 300rpx;
|
|
||||||
height: 155rpx;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.my-signin-item-num {
|
|
||||||
position: relative;
|
|
||||||
z-index: 9;
|
|
||||||
padding: 44rpx 28rpx 0;
|
|
||||||
line-height: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
view:last-child {
|
|
||||||
position: relative;
|
|
||||||
z-index: 9;
|
|
||||||
color: #abb0c1;
|
|
||||||
padding-left: 28rpx;
|
|
||||||
font-size: 20rpx;
|
|
||||||
line-height: 1;
|
|
||||||
margin-top: 16rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin-rule {
|
|
||||||
margin-top: 30rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-radius: 18rpx;
|
|
||||||
padding: 30rpx;
|
|
||||||
|
|
||||||
.signin-rule-title {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-start;
|
|
||||||
line-height: 32rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin-rule-con {
|
|
||||||
margin-top: 30rpx;
|
|
||||||
padding: 0 0;
|
|
||||||
|
|
||||||
.rule-item {
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #606266;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-box {
|
|
||||||
position: relative;
|
|
||||||
top: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.icon-close::before {
|
|
||||||
content: "\e609";
|
|
||||||
width: 42rpx;
|
|
||||||
height: 42rpx;
|
|
||||||
border: 1px solid #fff;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-radius: 50%;
|
|
||||||
color: $u-content-color;
|
|
||||||
position: absolute;
|
|
||||||
top: 70rpx;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pic {
|
|
||||||
width: 274rpx;
|
|
||||||
height: 200rpx;
|
|
||||||
position: relative;
|
|
||||||
margin-bottom: -30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-content {
|
|
||||||
background: #fff;
|
|
||||||
width: 70vw;
|
|
||||||
margin-top: -100rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
padding: 0 60rpx;
|
|
||||||
padding-bottom: 40rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-size: 100% 100rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-content-wrap {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 28rpx;
|
|
||||||
margin-top: 160rpx;
|
|
||||||
color: #999;
|
|
||||||
|
|
||||||
.num {
|
|
||||||
font-size: 32rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.desc {
|
|
||||||
color: #999;
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.other-info {
|
|
||||||
width: 300rpx;
|
|
||||||
height: 70rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
color: #fff;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: 40rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.up-empty{
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 100%;
|
|
||||||
padding: 100rpx 50rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
.remove-border {
|
|
||||||
&::after {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
17
src/addon/dailySignIn/types/signIn.d.ts
vendored
17
src/addon/dailySignIn/types/signIn.d.ts
vendored
@@ -1,17 +0,0 @@
|
|||||||
export type SingInData = {
|
|
||||||
showSignDays: Array
|
|
||||||
rule: rule[]
|
|
||||||
signState: number
|
|
||||||
rewardRuleDay: Array
|
|
||||||
cycle: number
|
|
||||||
reward: {}
|
|
||||||
}
|
|
||||||
/** 签到是否开启 */
|
|
||||||
export type BannerItem = {
|
|
||||||
status: number
|
|
||||||
}
|
|
||||||
export type rule = {
|
|
||||||
day: number
|
|
||||||
growth: number
|
|
||||||
point:number
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"--primary-color": "#FF4142",
|
|
||||||
"--primary-help-color": "#FB7939",
|
|
||||||
"--primary-color-dark": "#F26F3E",
|
|
||||||
"--primary-color-disabled": "#FFB397",
|
|
||||||
"--primary-color-light": "#FFF4F4",
|
|
||||||
"--page-bg-color": "#f7f7f7",
|
|
||||||
"--price-text-color": "#FF4142"
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export function inArray(elem: any, arr: string | any[] | null) {
|
|
||||||
return arr == null ? -1 : arr.indexOf(elem);
|
|
||||||
}
|
|
||||||
@@ -6,6 +6,9 @@ import request from '@/utils/request'
|
|||||||
export function getCustomerList(params : Record<string, any>) {
|
export function getCustomerList(params : Record<string, any>) {
|
||||||
return request.get(`erp/base/customer`, params)
|
return request.get(`erp/base/customer`, params)
|
||||||
}
|
}
|
||||||
|
export function getusersList(params : Record<string, any>) {
|
||||||
|
return request.get(`erp/base/getusers`, params)
|
||||||
|
}
|
||||||
// 食堂列表
|
// 食堂列表
|
||||||
export function getCustomerSelect(params : Record<string, any>) {
|
export function getCustomerSelect(params : Record<string, any>) {
|
||||||
return request.get(`erp/base/customer/select`, params)
|
return request.get(`erp/base/customer/select`, params)
|
||||||
|
|||||||
@@ -137,6 +137,19 @@ export function deleteRetire(id : number) {
|
|||||||
export function getManualList(params: Record<string, any>) {
|
export function getManualList(params: Record<string, any>) {
|
||||||
return request.get(`erp/inbound/manual`,params);
|
return request.get(`erp/inbound/manual`,params);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 入库单上传照片
|
||||||
|
* @param id 出库id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function setManualImg(id: any,params: Record<string, any>) {
|
||||||
|
return request.post(`erp/inbound/settu/${id}`,params,
|
||||||
|
{
|
||||||
|
showErrorMessage: true,
|
||||||
|
showSuccessMessage: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 添加入库
|
* 添加入库
|
||||||
* @param params
|
* @param params
|
||||||
|
|||||||
@@ -191,6 +191,19 @@ export function takeOutOfStorage(id: any) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 出库单上传照片
|
||||||
|
* @param id 出库id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function setManualImg(id: any,params: Record<string, any>) {
|
||||||
|
return request.post(`erp/outbound/settu/${id}`,params,
|
||||||
|
{
|
||||||
|
showErrorMessage: true,
|
||||||
|
showSuccessMessage: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 获取手工出库单列表
|
* 获取手工出库单列表
|
||||||
* @param params
|
* @param params
|
||||||
|
|||||||
BIN
src/addon/erp/erp.zip
Normal file
BIN
src/addon/erp/erp.zip
Normal file
Binary file not shown.
@@ -1,31 +1,47 @@
|
|||||||
{
|
{
|
||||||
"pages.index": "ERP首页",
|
"erp.pages.index": "首页",
|
||||||
"pages.member.index": "ERP个人中心",
|
"erp.pages.member.bind": "绑定账号",
|
||||||
"pages.base.customer.list": "客户管理666",
|
"erp.pages.member.index": "个人中心",
|
||||||
"pages.member.bind": "绑定账号",
|
"erp.pages.statistics": "统计",
|
||||||
"pages.statistics": "统计",
|
"erp.pages.base.customer.list": "食堂列表",
|
||||||
"pages.base.supplier.list": "供应商管理",
|
"erp.pages.base.customer.add": "添加食堂",
|
||||||
"pages.base.warehouse.list": "仓库管理",
|
"erp.pages.base.customer.detail": "食堂详情",
|
||||||
"pages.product.type.list": "产品分类",
|
"erp.pages.base.supplier.list": "供应商列表",
|
||||||
"pages.product.unit.list": "产品单位",
|
"erp.pages.base.supplier.add": "添加供应商",
|
||||||
"pages.product.product.list": "产品列表",
|
"erp.pages.base.supplier.detail": "供应商详情",
|
||||||
"pages.purchase.order.list": "采购单列表",
|
"erp.pages.base.warehouse.list": "仓库列表",
|
||||||
"pages.purchase.order.add": "采购开单",
|
"erp.pages.base.warehouse.add": "添加仓库",
|
||||||
"pages.purchase.order.detail": "采购单详情",
|
"erp.pages.base.warehouse.detail": "仓库详情",
|
||||||
"pages.purchase.storage.list": "入库单管理",
|
"erp.pages.product.type.list": "食材分类列表",
|
||||||
"pages.purchase.storage.detail": "入库单详情",
|
"erp.pages.product.type.add": "添加食材分类",
|
||||||
"pages.purchase.retire.list": "退货单管理",
|
"erp.pages.product.type.detail": "食材分类详情",
|
||||||
"pages.purchase.retire.detail": "退货单详情",
|
"erp.pages.product.unit.list": "食材单位列表",
|
||||||
"pages.sell.sell.list": "销售单管理",
|
"erp.pages.product.unit.add": "添加食材单位",
|
||||||
"pages.sell.sell.add": "添加销售单",
|
"erp.pages.product.unit.detail": "食材单位详情",
|
||||||
"pages.sell.sell.detail": "销售单详情",
|
"erp.pages.product.product.list": "食材列表",
|
||||||
"pages.sell.delivery.list": "出库单管理",
|
"erp.pages.product.product.add": "添加食材",
|
||||||
"pages.sell.delivery.add": "添加出库单",
|
"erp.pages.product.product.detail": "食材详情",
|
||||||
"pages.sell.delivery.detail": "出库单详情",
|
"erp.pages.inbound.order.list": "入库订单列表",
|
||||||
"pages.sell.sellreturn.list": "退货单管理",
|
"erp.pages.inbound.order.add": "添加入库订单",
|
||||||
"pages.sell.sellreturn.add": "添加退货单",
|
"erp.pages.inbound.order.detail": "入库订单详情",
|
||||||
"pages.sell.sellreturn.detail": "退货单详情",
|
"erp.pages.inbound.stockPending.list": "入库订单列表",
|
||||||
"pages.inventory.inventory.list": "盘点记录",
|
"erp.pages.inbound.stockPending.add": "添加入库订单",
|
||||||
"pages.inventory.inventory.add": "库存盘点",
|
"erp.pages.inbound.stockPending.detail": "入库订单详情",
|
||||||
"pages.inventory.statement.list": "库存流水"
|
"erp.pages.purchase.return.list": "采购退货列表",
|
||||||
|
"erp.pages.purchase.return.add": "添加采购退货",
|
||||||
|
"erp.pages.purchase.return.detail": "采购退货详情",
|
||||||
|
"erp.pages.outbound.order.list": "出库订单列表",
|
||||||
|
"erp.pages.outbound.order.add": "添加出库订单",
|
||||||
|
"erp.pages.outbound.order.detail": "出库订单详情",
|
||||||
|
"erp.pages.outbound.order.select": "选择",
|
||||||
|
"erp.pages.outbound.outPending.list": "出库订单列表",
|
||||||
|
"erp.pages.outbound.outPending.add": "添加出库订单",
|
||||||
|
"erp.pages.outbound.outPending.detail": "出库订单详情",
|
||||||
|
"erp.pages.canteen.return.list": "食堂退货列表",
|
||||||
|
"erp.pages.canteen.return.add": "添加食堂退货",
|
||||||
|
"erp.pages.canteen.return.detail": "食堂退货详情",
|
||||||
|
"erp.pages.inventory.inventory.list": "盘点管理",
|
||||||
|
"erp.pages.inventory.inventory.add": "添加盘点",
|
||||||
|
"erp.pages.inventory.statement.list": "库存流水列表",
|
||||||
|
"erp.pages.inventory.wprelationship.list": "库存查询列表"
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"title": "客户管理22222",
|
"title": "食堂管理",
|
||||||
|
|
||||||
"code": "客户编号",
|
"code": "食堂编号",
|
||||||
"codePlaceholder": "请输入客户编号",
|
"codePlaceholderNew": "请输入食堂编号",
|
||||||
"name": "客户名称",
|
"name": "食堂名称",
|
||||||
"namePlaceholder": "请输入客户名称",
|
"namePlaceholder": "请输入食堂名称",
|
||||||
"level": "客户等级",
|
"level": "食堂等级",
|
||||||
"levelPlaceholder": "请输入客户等级",
|
"levelPlaceholder": "请输入食堂等级",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"contactPlaceholder": "请输入联系人",
|
"contactPlaceholder": "请输入联系人",
|
||||||
"phone": "手机号码",
|
"phone": "手机号码",
|
||||||
"phonePlaceholder": "请输入手机号码",
|
"phonePlaceholder": "请输入手机号码",
|
||||||
"telephone": "公司电话",
|
"telephone": "负责人电话",
|
||||||
"telephonePlaceholder": "请输入公司电话",
|
"telephonePlaceholder": "请输入负责人电话",
|
||||||
"fax": "传真",
|
"fax": "传真",
|
||||||
"faxPlaceholder": "请输入传真",
|
"faxPlaceholder": "请输入传真",
|
||||||
"salesmanId": "业务员",
|
"salesmanId": "业务员",
|
||||||
@@ -39,8 +39,8 @@
|
|||||||
"firmidPlaceholder": "请输入企业编号",
|
"firmidPlaceholder": "请输入企业编号",
|
||||||
"status": "状态",
|
"status": "状态",
|
||||||
"statusPlaceholder": "请输入状态",
|
"statusPlaceholder": "请输入状态",
|
||||||
"addCustomer": "添加客户信息",
|
"addCustomer": "添加食堂信息",
|
||||||
"updateCustomer": "编辑客户信息",
|
"updateCustomer": "编辑食堂信息",
|
||||||
"customerDeleteTips": "确定要删除该数据吗?",
|
"customerDeleteTips": "确定要删除该数据吗?",
|
||||||
"customerStatusTips": "确定要变更该数据吗?",
|
"customerStatusTips": "确定要变更该数据吗?",
|
||||||
"startDate": "请选择开始时间",
|
"startDate": "请选择开始时间",
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"title": "客户管理77777",
|
"title": "食堂管理",
|
||||||
"info": "详情",
|
"info": "详情",
|
||||||
"delete": "删除",
|
"delete": "删除",
|
||||||
"code": "客户编号",
|
"code": "食堂编号",
|
||||||
"name": "客户名称",
|
"name": "食堂名称",
|
||||||
"level": "客户等级",
|
"level": "食堂等级",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"phone": "联系方式",
|
"phone": "联系方式",
|
||||||
"telephone": "公司电话",
|
"telephone": "负责人电话",
|
||||||
"fax": "传真",
|
"fax": "传真",
|
||||||
"salesmanId": "业务员",
|
"salesmanId": "业务员",
|
||||||
"city": "所属区域",
|
"city": "所属区域",
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"title": "客户管理641233333",
|
"title": "食堂管理",
|
||||||
"info": "详情",
|
"info": "详情",
|
||||||
"delete": "删除",
|
"delete": "删除",
|
||||||
"code": "客户编号",
|
"code": "食堂编号",
|
||||||
"name": "客户名称",
|
"name": "食堂名称",
|
||||||
"level": "客户等级",
|
"level": "食堂等级",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"phone": "联系方式",
|
"phone": "联系方式",
|
||||||
"telephone": "公司电话",
|
"telephone": "公司电话",
|
||||||
@@ -20,8 +20,8 @@
|
|||||||
"description": "说明",
|
"description": "说明",
|
||||||
"firmid": "企业编号",
|
"firmid": "企业编号",
|
||||||
"status": "状态",
|
"status": "状态",
|
||||||
"addCustomer": "添加客户信息",
|
"addCustomer": "添加食堂信息",
|
||||||
"updateCustomer": "编辑客户信息",
|
"updateCustomer": "编辑食堂信息",
|
||||||
"Invalid ID": "无效ID",
|
"Invalid ID": "无效ID",
|
||||||
"customerDeleteTips": "确定要删除该数据吗?",
|
"customerDeleteTips": "确定要删除该数据吗?",
|
||||||
"customerStatusTips": "确定要变更该数据吗?"
|
"customerStatusTips": "确定要变更该数据吗?"
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"code": "供应商编码",
|
"code": "供应商编码",
|
||||||
"codePlaceholder": "请输入供应商编码",
|
"codePlaceholderNew": "请输入供应商编码",
|
||||||
"name": "供应商名称",
|
"name": "供应商名称",
|
||||||
"namePlaceholder": "请输入供应商名称",
|
"namePlaceholder": "请输入供应商名称",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"contactPlaceholder": "请输入联系人",
|
"contactPlaceholder": "请输入联系人",
|
||||||
"phone": "联系方式",
|
"phone": "联系电话",
|
||||||
"phonePlaceholder": "请输入联系方式",
|
"phonePlaceholder": "请输入联系电话",
|
||||||
"city": "区域",
|
"city": "区域",
|
||||||
"cityPlaceholder": "请输入区域",
|
"cityPlaceholder": "请输入区域",
|
||||||
"address": "详细地址",
|
"address": "详细地址",
|
||||||
"addressPlaceholder": "请输入详细地址",
|
"addressPlaceholder": "请输入详细地址",
|
||||||
"mobile": "公司电话",
|
"merchantMobile": "商家电话",
|
||||||
"mobilePlaceholder": "请输入公司电话",
|
"merchantMobilePlaceholder": "请输入商家电话",
|
||||||
"bank": "开户银行",
|
"bank": "开户银行",
|
||||||
"bankPlaceholder": "请输入开户银行",
|
"bankPlaceholder": "请输入开户银行",
|
||||||
"banknums": "银行账号",
|
"banknums": "银行账号",
|
||||||
@@ -31,5 +31,9 @@
|
|||||||
"descriptionPlaceholder": "请输入说明",
|
"descriptionPlaceholder": "请输入说明",
|
||||||
"addSupplier": "添加供应商",
|
"addSupplier": "添加供应商",
|
||||||
"updateSupplier": "编辑供应商",
|
"updateSupplier": "编辑供应商",
|
||||||
"supplierDeleteTips": "确定要删除该数据吗?"
|
"supplierDeleteTips": "确定要删除该数据吗?",
|
||||||
|
"credentialImage": "供应商资质",
|
||||||
|
"credentialImagePlaceholder": "请上传供应商资质",
|
||||||
|
"productType": "供货类型",
|
||||||
|
"productTypePlaceholder": "请选择供货类型"
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
"code": "供应商编码",
|
"code": "供应商编码",
|
||||||
"name": "供应商名称",
|
"name": "供应商名称",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"phone": "联系方式",
|
"phone": "联系电话",
|
||||||
"city": "区域",
|
"city": "区域",
|
||||||
"address": "详细地址",
|
"address": "详细地址",
|
||||||
"mobile": "公司电话",
|
"merchantMobile": "商家电话",
|
||||||
"bank": "开户银行",
|
"bank": "开户银行",
|
||||||
"banknums": "银行账号",
|
"banknums": "银行账号",
|
||||||
"term": "账期(天)",
|
"term": "账期(天)",
|
||||||
@@ -14,5 +14,7 @@
|
|||||||
"credit": "社会信用代码",
|
"credit": "社会信用代码",
|
||||||
"amount": "信用额度(元)",
|
"amount": "信用额度(元)",
|
||||||
"salesmanId": "业务员",
|
"salesmanId": "业务员",
|
||||||
"description": "说明"
|
"description": "说明",
|
||||||
|
"credentialImage": "供应商资质",
|
||||||
|
"productType": "供货类型"
|
||||||
}
|
}
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
"code": "供应商编码",
|
"code": "供应商编码",
|
||||||
"name": "供应商名称",
|
"name": "供应商名称",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"phone": "联系方式",
|
"phone": "联系电话",
|
||||||
"city": "区域",
|
"city": "区域",
|
||||||
"address": "详细地址",
|
"address": "详细地址",
|
||||||
"mobile": "公司电话",
|
"merchantMobile": "商家电话",
|
||||||
"bank": "开户银行",
|
"bank": "开户银行",
|
||||||
"banknums": "银行账号",
|
"banknums": "银行账号",
|
||||||
"term": "账期(天)",
|
"term": "账期(天)",
|
||||||
@@ -18,5 +18,7 @@
|
|||||||
"description": "说明",
|
"description": "说明",
|
||||||
"addSupplier": "添加供应商",
|
"addSupplier": "添加供应商",
|
||||||
"updateSupplier": "编辑供应商",
|
"updateSupplier": "编辑供应商",
|
||||||
"supplierDeleteTips": "确定要删除该数据吗?"
|
"supplierDeleteTips": "确定要删除该数据吗?",
|
||||||
|
"credentialImage": "供应商资质",
|
||||||
|
"productType": "供货类型"
|
||||||
}
|
}
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
"numberPlaceholder": "请输入仓库编号",
|
"numberPlaceholder": "请输入仓库编号",
|
||||||
"remark": "备注",
|
"remark": "备注",
|
||||||
"remarkPlaceholder": "请输入备注",
|
"remarkPlaceholder": "请输入备注",
|
||||||
"linkman": "联系人",
|
"linkman": "仓管员",
|
||||||
"linkmanPlaceholder": "请输入联系人",
|
"linkmanPlaceholder": "请输入仓管员",
|
||||||
"phone": "联系电话",
|
"phone": "联系电话",
|
||||||
"phonePlaceholder": "请输入联系电话",
|
"phonePlaceholder": "请输入联系电话",
|
||||||
"postal": "邮政编码",
|
"postal": "邮政编码",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "仓库名称",
|
"name": "仓库名称",
|
||||||
"number": "仓库编号",
|
"number": "仓库编号",
|
||||||
"remark": "备注",
|
"remark": "备注",
|
||||||
"linkman": "联系人",
|
"linkman": "仓管员",
|
||||||
"phone": "联系电话",
|
"phone": "联系电话",
|
||||||
"postal": "邮政编码",
|
"postal": "邮政编码",
|
||||||
"inventory": "库存",
|
"inventory": "库存",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "仓库名称",
|
"name": "仓库名称",
|
||||||
"number": "仓库编号",
|
"number": "仓库编号",
|
||||||
"remark": "备注",
|
"remark": "备注",
|
||||||
"linkman": "联系人",
|
"linkman": "仓管员",
|
||||||
"phone": "联系电话",
|
"phone": "联系电话",
|
||||||
"postal": "邮政编码",
|
"postal": "邮政编码",
|
||||||
"inventory": "库存",
|
"inventory": "库存",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"code": "单据编号",
|
"code": "单据编号",
|
||||||
"productCode": "产品编号",
|
"productCode": "食材编号",
|
||||||
"codePlaceholder": "请输入单据编号",
|
"codePlaceholderNew": "请输入单据编号",
|
||||||
"supplierId": "供应商",
|
"supplierId": "供应商",
|
||||||
"supplierIdPlaceholder": "请输入供应商",
|
"supplierIdPlaceholder": "请选择供应商",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"contactPlaceholder": "请输入联系人",
|
"contactPlaceholder": "请输入联系人",
|
||||||
"phone": "联系电话",
|
"phone": "联系电话",
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
"deliveryTime": "交货日期",
|
"deliveryTime": "交货日期",
|
||||||
"deliveryTimePlaceholder": "请输入交货日期",
|
"deliveryTimePlaceholder": "请输入交货日期",
|
||||||
"type": "交货方式",
|
"type": "交货方式",
|
||||||
"typePlaceholder": "请输入交货方式",
|
"typePlaceholder": "请选择交货方式",
|
||||||
"purmanId": "采购审核人",
|
"purmanId": "采购审核人",
|
||||||
"purmanIdPlaceholder": "请输入采购审核人",
|
"purmanIdPlaceholder": "请输入采购审核人",
|
||||||
"warehouseId": "仓库",
|
"warehouseId": "仓库",
|
||||||
@@ -41,21 +41,26 @@
|
|||||||
"storageStatus": "入库状态",
|
"storageStatus": "入库状态",
|
||||||
"addOrder": "添加采购订单",
|
"addOrder": "添加采购订单",
|
||||||
"createTime": "创建时间",
|
"createTime": "创建时间",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productTypeId": "产品分类",
|
"productTypeId": "食材分类",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productUnitId": "产品单位",
|
"productUnitId": "食材单位",
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"purchaseQuantity": "采购数量",
|
"purchaseQuantity": "采购数量",
|
||||||
"purchasePrice": "采购价格(元)",
|
"purchasePrice": "采购价格(元)",
|
||||||
"totalPrice": "小计(元)",
|
"totalPrice": "小计(元)",
|
||||||
"total": "合计(元)",
|
"total": "合计(元)",
|
||||||
|
"batchNumber":"批次号",
|
||||||
"Enter product": "录入产品",
|
"batchNumberPlaceholder": "请输入批次号",
|
||||||
|
"inboundImage":"图片",
|
||||||
|
"inboundImagePlaceholder": "请上传图片",
|
||||||
|
"inspectionReportImage":"检验图片",
|
||||||
|
"inspectionReportImagePlaceholder": "请上传检验图片",
|
||||||
|
"Enter product": "录入食材",
|
||||||
"Add product": "新增",
|
"Add product": "新增",
|
||||||
|
|
||||||
"productCode": "产品编号",
|
"productCode": "食材编号",
|
||||||
"spec": "产品规格",
|
"spec": "食材规格",
|
||||||
"purchasePrice": "采购单价",
|
"purchasePrice": "采购单价",
|
||||||
"purchaseQuantity": "采购数量"
|
"purchaseQuantity": "采购数量"
|
||||||
}
|
}
|
||||||
41
src/addon/erp/locale/zh-Hans/pages.inbound.order.detail.json
Normal file
41
src/addon/erp/locale/zh-Hans/pages.inbound.order.detail.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"code": "单据编号",
|
||||||
|
"productCode": "食材编号",
|
||||||
|
"supplierId": "供应商",
|
||||||
|
"contact": "联系人",
|
||||||
|
"phone": "联系电话",
|
||||||
|
"deliveryTime": "到货日期",
|
||||||
|
"type": "交货方式",
|
||||||
|
"purmanId": "采购审核人",
|
||||||
|
"warehouseId": "仓库",
|
||||||
|
"billingTime": "制单日期",
|
||||||
|
"waitNums": "待入库数",
|
||||||
|
"city": "所属区域",
|
||||||
|
"address": "详细地址",
|
||||||
|
"totalNums": "采购数量",
|
||||||
|
"storageNums": "已入库数",
|
||||||
|
"rate": "税率(%)",
|
||||||
|
"money": "税前金额",
|
||||||
|
"totalMoney": "应付金额",
|
||||||
|
"status": "审核状态",
|
||||||
|
"remark": "备注",
|
||||||
|
"reason": "失败原因",
|
||||||
|
"storageStatus": "入库状态",
|
||||||
|
"createTime": "创建时间",
|
||||||
|
"productName": "食材名称",
|
||||||
|
"productTypeId": "食材分类",
|
||||||
|
"productSpec": "食材规格",
|
||||||
|
"productUnitId": "食材单位",
|
||||||
|
"choose": "选择",
|
||||||
|
"purchaseQuantity": "采购数量",
|
||||||
|
"purchasePrice": "采购价格(元)",
|
||||||
|
"totalPrice": "小计(元)",
|
||||||
|
"total": "合计(元)",
|
||||||
|
"batchNumber":"批次号",
|
||||||
|
"inboundImage":"图片",
|
||||||
|
"inspectionReportImage":"检验图片",
|
||||||
|
|
||||||
|
"spec": "食材规格",
|
||||||
|
"info": "详情",
|
||||||
|
"Product List": "食材列表"
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"code": "单据编号",
|
"code": "单据编号",
|
||||||
"productCode": "产品编号",
|
"productCode": "食材编号",
|
||||||
"supplierId": "供应商",
|
"supplierId": "供应商",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"phone": "联系电话",
|
"phone": "联系电话",
|
||||||
@@ -22,17 +22,16 @@
|
|||||||
"reason": "失败原因",
|
"reason": "失败原因",
|
||||||
"storageStatus": "入库状态",
|
"storageStatus": "入库状态",
|
||||||
"createTime": "创建时间",
|
"createTime": "创建时间",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productTypeId": "产品分类",
|
"productTypeId": "食材分类",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productUnitId": "产品单位",
|
"productUnitId": "食材单位",
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"purchaseQuantity": "采购数量",
|
"purchaseQuantity": "采购数量",
|
||||||
"purchasePrice": "采购价格(元)",
|
"purchasePrice": "采购价格(元)",
|
||||||
"totalPrice": "小计(元)",
|
"totalPrice": "小计(元)",
|
||||||
"total": "合计(元)",
|
"total": "合计(元)",
|
||||||
|
|
||||||
"spec": "产品规格",
|
|
||||||
"info": "详情",
|
"info": "详情",
|
||||||
"Product List": "产品列表"
|
"batchNumber":"批次号",
|
||||||
|
"detailGo":"详情"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
"code": "单据编号",
|
||||||
|
"productCode": "食材编号",
|
||||||
|
"codePlaceholderNew": "请输入单据编号",
|
||||||
|
"supplierId": "供应商",
|
||||||
|
"supplierIdPlaceholder": "请选择供应商",
|
||||||
|
"contact": "联系人",
|
||||||
|
"contactPlaceholder": "请输入联系人",
|
||||||
|
"phone": "联系电话",
|
||||||
|
"phonePlaceholder": "请输入联系电话",
|
||||||
|
"deliveryTime": "交货日期",
|
||||||
|
"deliveryTimePlaceholder": "请输入交货日期",
|
||||||
|
"type": "交货方式",
|
||||||
|
"typePlaceholder": "请选择交货方式",
|
||||||
|
"purmanId": "采购审核人",
|
||||||
|
"purmanIdPlaceholder": "请输入采购审核人",
|
||||||
|
"warehouseId": "仓库",
|
||||||
|
"warehouseIdPlaceholder": "请选择仓库",
|
||||||
|
"billingTime": "制单日期",
|
||||||
|
"billingTimePlaceholder": "请输入制单日期",
|
||||||
|
"waitNums": "待入库数",
|
||||||
|
"waitNumsPlaceholder": "请输入待入库数",
|
||||||
|
"city": "所属区域",
|
||||||
|
"cityPlaceholder": "请输入所属区域",
|
||||||
|
"address": "详细地址",
|
||||||
|
"addressPlaceholder": "请输入详细地址",
|
||||||
|
"totalNums": "总数量",
|
||||||
|
"storageNums": "已入库数",
|
||||||
|
"totalNumsPlaceholder": "请输入总数量",
|
||||||
|
"rate": "税率(%)",
|
||||||
|
"ratePlaceholder": "请输入税率",
|
||||||
|
"money": "税前金额",
|
||||||
|
"moneyPlaceholder": "请输入税前金额",
|
||||||
|
"totalMoney": "应付金额",
|
||||||
|
"totalMoneyPlaceholder": "请输入应付金额",
|
||||||
|
"status": "审核状态",
|
||||||
|
"statusPlaceholder": "请输入",
|
||||||
|
"remark": "备注",
|
||||||
|
"remarkPlaceholder": "请输入备注",
|
||||||
|
"reason": "失败原因",
|
||||||
|
"storageStatus": "入库状态",
|
||||||
|
"addOrder": "添加采购订单",
|
||||||
|
"createTime": "创建时间",
|
||||||
|
"productName": "食材名称",
|
||||||
|
"productTypeId": "食材分类",
|
||||||
|
"productSpec": "食材规格",
|
||||||
|
"productUnitId": "食材单位",
|
||||||
|
"choose": "选择",
|
||||||
|
"purchaseQuantity": "采购数量",
|
||||||
|
"purchasePrice": "采购价格(元)",
|
||||||
|
"totalPrice": "小计(元)",
|
||||||
|
"total": "合计(元)",
|
||||||
|
"batchNumber":"批次号",
|
||||||
|
"batchNumberPlaceholder": "请输入批次号",
|
||||||
|
"inboundImage":"图片",
|
||||||
|
"inboundImagePlaceholder": "请上传图片",
|
||||||
|
"inspectionReportImage":"检验图片",
|
||||||
|
"inspectionReportImagePlaceholder": "请上传检验图片",
|
||||||
|
"Enter product": "录入食材",
|
||||||
|
"Add product": "新增",
|
||||||
|
|
||||||
|
"productCode": "食材编号",
|
||||||
|
"spec": "食材规格",
|
||||||
|
"purchasePrice": "采购单价",
|
||||||
|
"purchaseQuantity": "采购数量"
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"code": "单据编号",
|
||||||
|
"productCode": "食材编号",
|
||||||
|
"supplierId": "供应商",
|
||||||
|
"contact": "联系人",
|
||||||
|
"phone": "联系电话",
|
||||||
|
"deliveryTime": "到货日期",
|
||||||
|
"type": "交货方式",
|
||||||
|
"purmanId": "采购审核人",
|
||||||
|
"warehouseId": "仓库",
|
||||||
|
"billingTime": "制单日期",
|
||||||
|
"waitNums": "待入库数",
|
||||||
|
"city": "所属区域",
|
||||||
|
"address": "详细地址",
|
||||||
|
"totalNums": "采购数量",
|
||||||
|
"storageNums": "已入库数",
|
||||||
|
"rate": "税率(%)",
|
||||||
|
"money": "税前金额",
|
||||||
|
"totalMoney": "应付金额",
|
||||||
|
"status": "审核状态",
|
||||||
|
"remark": "备注",
|
||||||
|
"reason": "失败原因",
|
||||||
|
"storageStatus": "入库状态",
|
||||||
|
"createTime": "创建时间",
|
||||||
|
"productName": "食材名称",
|
||||||
|
"productTypeId": "食材分类",
|
||||||
|
"productSpec": "食材规格",
|
||||||
|
"productUnitId": "食材单位",
|
||||||
|
"choose": "选择",
|
||||||
|
"purchaseQuantity": "采购数量",
|
||||||
|
"purchasePrice": "采购价格(元)",
|
||||||
|
"totalPrice": "小计(元)",
|
||||||
|
"total": "合计(元)",
|
||||||
|
"batchNumber":"批次号",
|
||||||
|
"inboundImage":"图片",
|
||||||
|
"inspectionReportImage":"检验图片",
|
||||||
|
|
||||||
|
"spec": "食材规格",
|
||||||
|
"info": "详情",
|
||||||
|
"Product List": "食材列表"
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"code": "单据编号",
|
"code": "单据编号",
|
||||||
"productCode": "产品编号",
|
"productCode": "食材编号",
|
||||||
"supplierId": "供应商",
|
"supplierId": "供应商",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"phone": "联系电话",
|
"phone": "联系电话",
|
||||||
@@ -22,14 +22,16 @@
|
|||||||
"reason": "失败原因",
|
"reason": "失败原因",
|
||||||
"storageStatus": "入库状态",
|
"storageStatus": "入库状态",
|
||||||
"createTime": "创建时间",
|
"createTime": "创建时间",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productTypeId": "产品分类",
|
"productTypeId": "食材分类",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productUnitId": "产品单位",
|
"productUnitId": "食材单位",
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"purchaseQuantity": "采购数量",
|
"purchaseQuantity": "采购数量",
|
||||||
"purchasePrice": "采购价格(元)",
|
"purchasePrice": "采购价格(元)",
|
||||||
"totalPrice": "小计(元)",
|
"totalPrice": "小计(元)",
|
||||||
"total": "合计(元)",
|
"total": "合计(元)",
|
||||||
"info": "详情"
|
"info": "详情",
|
||||||
|
"batchNumber":"批次号",
|
||||||
|
"detailGo":"详情"
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
"warehouseName": "所在仓库",
|
"warehouseName": "所在仓库",
|
||||||
"warehouseNamePlaceholder": "请选择仓库",
|
"warehouseNamePlaceholder": "请选择仓库",
|
||||||
"productId": "商品ID",
|
"productId": "商品ID",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productUnit": "产品单位",
|
"productUnit": "食材单位",
|
||||||
"productNamePlaceholder": "请选择产品",
|
"productNamePlaceholder": "请选择食材",
|
||||||
"surfaceNum": "账目数量",
|
"surfaceNum": "账目数量",
|
||||||
"surfaceNumPlaceholder": "请输入账目数量",
|
"surfaceNumPlaceholder": "请输入账目数量",
|
||||||
"number": "盈亏数量",
|
"number": "盈亏数量",
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
"warehouseId": "仓库",
|
"warehouseId": "仓库",
|
||||||
"warehouseName": "所在仓库",
|
"warehouseName": "所在仓库",
|
||||||
"productId": "商品ID",
|
"productId": "商品ID",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productUnit": "产品单位",
|
"productUnit": "食材单位",
|
||||||
"surfaceNum": "账目数量",
|
"surfaceNum": "账目数量",
|
||||||
"number": "盈亏数量",
|
"number": "盈亏数量",
|
||||||
"realNum": "实际数量",
|
"realNum": "实际数量",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"productId": "商品ID",
|
"productId": "商品ID",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"warehouseId": "仓库ID",
|
"warehouseId": "仓库ID",
|
||||||
"warehouseName": "所在仓库",
|
"warehouseName": "所在仓库",
|
||||||
"number": "流水数量",
|
"number": "流水数量",
|
||||||
@@ -11,6 +11,6 @@
|
|||||||
"startDate": "请选择开始时间",
|
"startDate": "请选择开始时间",
|
||||||
"endDate": "请选择结束时间",
|
"endDate": "请选择结束时间",
|
||||||
"updateTime": "更新时间",
|
"updateTime": "更新时间",
|
||||||
"productUnit": "产品单位",
|
"productUnit": "食材单位",
|
||||||
"productSpec": "产品规格"
|
"productSpec": "食材规格"
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"warehouseId": "仓库id",
|
"warehouseId": "仓库id",
|
||||||
"warehouseName": "所在仓库",
|
"warehouseName": "所在仓库",
|
||||||
"productId": "产品id",
|
"productId": "食材id",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productUnit": "产品单位",
|
"productUnit": "食材单位",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"inventory": "可用库存",
|
"inventory": "可用库存",
|
||||||
"freeze": "冻结库存",
|
"freeze": "冻结库存",
|
||||||
"updateTime": "更新时间"
|
"updateTime": "更新时间"
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
{
|
{
|
||||||
"code": "单据编号",
|
"code": "单据编号",
|
||||||
"codePlaceholder": "请输入单据编号",
|
"codePlaceholderNew": "请输入单据编号",
|
||||||
"customerId": "客户名称",
|
"customerId": "食堂名称",
|
||||||
"customerIdPlaceholder": "请输入客户",
|
"customerIdPlaceholder": "请选择食堂",
|
||||||
|
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"phone": "联系电话",
|
"phone": "联系电话",
|
||||||
|
|
||||||
"deliveryTime": "交货时间",
|
"deliveryTime": "送货日期",
|
||||||
"deliveryTimePlaceholder": "请输入交货时间",
|
"deliveryTimePlaceholder": "请选择送货日期",
|
||||||
"type": "交货方式",
|
"type": "交货方式",
|
||||||
"typePlaceholder": "交货方式",
|
"typePlaceholder": "请选择交货方式",
|
||||||
|
"batchNumber":"批次号",
|
||||||
|
"batchNumberPlaceholder": "请输入批次号",
|
||||||
|
"warehouseName": "仓库名称",
|
||||||
|
"warehousePlaceholder": "请选择仓库",
|
||||||
|
"outboundImage": "图片",
|
||||||
|
"outboundImagePlaceholder": "请上传图片",
|
||||||
"purmanId": "销售审核人",
|
"purmanId": "销售审核人",
|
||||||
"purmanIdPlaceholder": "请输入销售审核人",
|
"purmanIdPlaceholder": "请输入销售审核人",
|
||||||
"billingTime": "制单日期",
|
"billingTime": "制单日期",
|
||||||
@@ -37,28 +43,23 @@
|
|||||||
"sellDeleteTips": "确定要删除该数据吗?",
|
"sellDeleteTips": "确定要删除该数据吗?",
|
||||||
"startDate": "请选择开始时间",
|
"startDate": "请选择开始时间",
|
||||||
"endDate": "请选择结束时间",
|
"endDate": "请选择结束时间",
|
||||||
|
"productCode": "食材编号",
|
||||||
"productCode": "产品编号",
|
"productName": "食材名称",
|
||||||
"productName": "产品名称",
|
"productTypeId": "食材分类",
|
||||||
"productTypeId": "产品分类",
|
"productSpec": "食材规格",
|
||||||
"productSpec": "产品规格",
|
"productUnitId": "食材单位",
|
||||||
"productUnitId": "产品单位",
|
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"quantity": "数量",
|
"quantity": "出库数量",
|
||||||
"inventory": "库存",
|
"inventory": "库存",
|
||||||
"canUseInventory": "可用库存",
|
"canUseInventory": "可用库存",
|
||||||
"warehouseName": "仓库名称",
|
"sellPrice": "单价(元)",
|
||||||
"sellPrice": "销售单价(元)",
|
|
||||||
"totalPrice": "小计(元)",
|
"totalPrice": "小计(元)",
|
||||||
"total": "合计(元)",
|
"total": "合计(元)",
|
||||||
|
|
||||||
"city": "所属区域",
|
"city": "所属区域",
|
||||||
"address": "详细地址",
|
"address": "详细地址",
|
||||||
|
|
||||||
"delivery": "发货",
|
"delivery": "发货",
|
||||||
"sellDelivery": "销售单",
|
"sellDelivery": "销售单",
|
||||||
"sellQuantity": "出库数量",
|
"sellQuantity": "出库数量",
|
||||||
|
"Enter product": "录入食材",
|
||||||
"Enter product": "录入产品",
|
|
||||||
"Add product": "新增"
|
"Add product": "新增"
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"code": "单据编号",
|
"code": "单据编号",
|
||||||
"customerId": "客户名称",
|
"customerId": "食堂名称",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"phone": "联系电话",
|
"phone": "联系电话",
|
||||||
"deliveryTime": "交货时间",
|
"deliveryTime": "交货时间",
|
||||||
@@ -14,11 +14,11 @@
|
|||||||
"status": "状态",
|
"status": "状态",
|
||||||
"supplierName": "供应商名称",
|
"supplierName": "供应商名称",
|
||||||
"remark": "备注",
|
"remark": "备注",
|
||||||
"productCode": "产品编号",
|
"productCode": "食材编号",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productTypeId": "产品分类",
|
"productTypeId": "食材分类",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productUnitId": "产品单位",
|
"productUnitId": "食材单位",
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"quantity": "数量",
|
"quantity": "数量",
|
||||||
"inventory": "库存",
|
"inventory": "库存",
|
||||||
@@ -34,5 +34,5 @@
|
|||||||
"delivery": "发货",
|
"delivery": "发货",
|
||||||
"sellDelivery": "销售单",
|
"sellDelivery": "销售单",
|
||||||
"sellQuantity": "出库数量",
|
"sellQuantity": "出库数量",
|
||||||
"Product List": "产品列表"
|
"Product List": "食材列表"
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"code": "单据编号",
|
"code": "单据编号",
|
||||||
"customerId": "客户名称",
|
"customerId": "食堂名称",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"phone": "联系电话",
|
"phone": "联系电话",
|
||||||
"deliveryTime": "交货时间",
|
"deliveryTime": "交货时间",
|
||||||
@@ -14,11 +14,11 @@
|
|||||||
"status": "状态",
|
"status": "状态",
|
||||||
"supplierName": "供应商名称",
|
"supplierName": "供应商名称",
|
||||||
"remark": "备注",
|
"remark": "备注",
|
||||||
"productCode": "产品编号",
|
"productCode": "食材编号",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productTypeId": "产品分类",
|
"productTypeId": "食材分类",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productUnitId": "产品单位",
|
"productUnitId": "食材单位",
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"quantity": "数量",
|
"quantity": "数量",
|
||||||
"inventory": "库存",
|
"inventory": "库存",
|
||||||
@@ -34,6 +34,6 @@
|
|||||||
"delivery": "发货",
|
"delivery": "发货",
|
||||||
"sellDelivery": "销售单",
|
"sellDelivery": "销售单",
|
||||||
"sellQuantity": "出库数量",
|
"sellQuantity": "出库数量",
|
||||||
"Enter product": "录入产品",
|
"Enter product": "录入食材",
|
||||||
"Add product": "新增"
|
"Add product": "新增"
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"code": "单据编号",
|
"code": "单据编号",
|
||||||
"customerId": "客户名称",
|
"customerId": "食堂名称",
|
||||||
"contact": "联系人",
|
"contact": "联系人",
|
||||||
"phone": "联系电话",
|
"phone": "联系电话",
|
||||||
"deliveryTime": "交货时间",
|
"deliveryTime": "交货时间",
|
||||||
@@ -14,11 +14,11 @@
|
|||||||
"status": "状态",
|
"status": "状态",
|
||||||
"supplierName": "供应商名称",
|
"supplierName": "供应商名称",
|
||||||
"remark": "备注",
|
"remark": "备注",
|
||||||
"productCode": "产品编号",
|
"productCode": "食材编号",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productTypeId": "产品分类",
|
"productTypeId": "食材分类",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productUnitId": "产品单位",
|
"productUnitId": "食材单位",
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"quantity": "数量",
|
"quantity": "数量",
|
||||||
"inventory": "库存",
|
"inventory": "库存",
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
"delivery": "发货",
|
"delivery": "发货",
|
||||||
"sellDelivery": "销售单",
|
"sellDelivery": "销售单",
|
||||||
"sellQuantity": "出库数量",
|
"sellQuantity": "出库数量",
|
||||||
"Enter product": "录入产品",
|
"Enter product": "录入食材",
|
||||||
"Add product": "新增",
|
"Add product": "新增",
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"confirmChoose": "确认选择"
|
"confirmChoose": "确认选择"
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"code": "单据编号",
|
||||||
|
"codePlaceholderNew": "请输入单据编号",
|
||||||
|
"customerId": "食堂名称",
|
||||||
|
"customerIdPlaceholder": "请选择食堂",
|
||||||
|
|
||||||
|
"contact": "联系人",
|
||||||
|
"phone": "联系电话",
|
||||||
|
|
||||||
|
"deliveryTime": "送货日期",
|
||||||
|
"deliveryTimePlaceholder": "请选择送货日期",
|
||||||
|
"type": "交货方式",
|
||||||
|
"typePlaceholder": "请选择交货方式",
|
||||||
|
"batchNumber":"批次号",
|
||||||
|
"batchNumberPlaceholder": "请输入批次号",
|
||||||
|
"warehouseName": "仓库名称",
|
||||||
|
"warehousePlaceholder": "请选择仓库",
|
||||||
|
"outboundImage": "图片",
|
||||||
|
"outboundImagePlaceholder": "请上传图片",
|
||||||
|
"purmanId": "销售审核人",
|
||||||
|
"purmanIdPlaceholder": "请输入销售审核人",
|
||||||
|
"billingTime": "制单日期",
|
||||||
|
"billingTimePlaceholder": "请输入制单日期",
|
||||||
|
"totalNums": "总数量",
|
||||||
|
"totalNumsPlaceholder": "请输入总数量",
|
||||||
|
"rate": "税率(%)",
|
||||||
|
"ratePlaceholder": "请输入税率",
|
||||||
|
"theoryMoney": "税前金额",
|
||||||
|
"theoryMoneyPlaceholder": "请输入税前金额",
|
||||||
|
"realMoney": "应付金额",
|
||||||
|
"realMoneyPlaceholder": "请输入应付金额",
|
||||||
|
"status": "状态",
|
||||||
|
"statusPlaceholder": "请选择状态",
|
||||||
|
"supplierName": "供应商名称",
|
||||||
|
"remark": "备注",
|
||||||
|
"remarkPlaceholder": "请输入备注",
|
||||||
|
"createBy": "操作员",
|
||||||
|
"createByPlaceholder": "请输入操作员",
|
||||||
|
"addSell": "添加销售单",
|
||||||
|
"addDelivery": "添加发货单",
|
||||||
|
"updateSell": "编辑销售单",
|
||||||
|
"infoSell": "销售单详情",
|
||||||
|
"sellDeleteTips": "确定要删除该数据吗?",
|
||||||
|
"startDate": "请选择开始时间",
|
||||||
|
"endDate": "请选择结束时间",
|
||||||
|
"productCode": "食材编号",
|
||||||
|
"productName": "食材名称",
|
||||||
|
"productTypeId": "食材分类",
|
||||||
|
"productSpec": "食材规格",
|
||||||
|
"productUnitId": "食材单位",
|
||||||
|
"choose": "选择",
|
||||||
|
"quantity": "出库数量",
|
||||||
|
"inventory": "库存",
|
||||||
|
"canUseInventory": "可用库存",
|
||||||
|
"sellPrice": "单价(元)",
|
||||||
|
"totalPrice": "小计(元)",
|
||||||
|
"total": "合计(元)",
|
||||||
|
"city": "所属区域",
|
||||||
|
"address": "详细地址",
|
||||||
|
"delivery": "发货",
|
||||||
|
"sellDelivery": "销售单",
|
||||||
|
"sellQuantity": "出库数量",
|
||||||
|
"Enter product": "录入食材",
|
||||||
|
"Add product": "新增"
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"code": "单据编号",
|
||||||
|
"customerId": "食堂名称",
|
||||||
|
"contact": "联系人",
|
||||||
|
"phone": "联系电话",
|
||||||
|
"deliveryTime": "交货时间",
|
||||||
|
"type": "交货方式",
|
||||||
|
"typePlaceholder": "交货方式",
|
||||||
|
"billingTime": "制单日期",
|
||||||
|
"totalNums": "总数量",
|
||||||
|
"rate": "税率(%)",
|
||||||
|
"theoryMoney": "税前金额",
|
||||||
|
"realMoney": "应付金额",
|
||||||
|
"status": "状态",
|
||||||
|
"supplierName": "供应商名称",
|
||||||
|
"remark": "备注",
|
||||||
|
"productCode": "食材编号",
|
||||||
|
"productName": "食材名称",
|
||||||
|
"productTypeId": "食材分类",
|
||||||
|
"productSpec": "食材规格",
|
||||||
|
"productUnitId": "食材单位",
|
||||||
|
"choose": "选择",
|
||||||
|
"quantity": "数量",
|
||||||
|
"inventory": "库存",
|
||||||
|
"canUseInventory": "可用库存",
|
||||||
|
"warehouseName": "仓库名称",
|
||||||
|
"sellPrice": "销售单价(元)",
|
||||||
|
"totalPrice": "小计(元)",
|
||||||
|
"total": "合计(元)",
|
||||||
|
"updateTime": "更新时间",
|
||||||
|
"city": "所属区域",
|
||||||
|
"address": "详细地址",
|
||||||
|
"completeOrder": "订单完成",
|
||||||
|
"delivery": "发货",
|
||||||
|
"sellDelivery": "销售单",
|
||||||
|
"sellQuantity": "出库数量",
|
||||||
|
"Product List": "食材列表"
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"code": "单据编号",
|
||||||
|
"customerId": "食堂名称",
|
||||||
|
"contact": "联系人",
|
||||||
|
"phone": "联系电话",
|
||||||
|
"deliveryTime": "交货时间",
|
||||||
|
"type": "交货方式",
|
||||||
|
"typePlaceholder": "交货方式",
|
||||||
|
"billingTime": "制单日期",
|
||||||
|
"totalNums": "总数量",
|
||||||
|
"rate": "税率(%)",
|
||||||
|
"theoryMoney": "税前金额",
|
||||||
|
"realMoney": "应付金额",
|
||||||
|
"status": "状态",
|
||||||
|
"supplierName": "供应商名称",
|
||||||
|
"remark": "备注",
|
||||||
|
"productCode": "食材编号",
|
||||||
|
"productName": "食材名称",
|
||||||
|
"productTypeId": "食材分类",
|
||||||
|
"productSpec": "食材规格",
|
||||||
|
"productUnitId": "食材单位",
|
||||||
|
"choose": "选择",
|
||||||
|
"quantity": "数量",
|
||||||
|
"inventory": "库存",
|
||||||
|
"canUseInventory": "可用库存",
|
||||||
|
"warehouseName": "仓库名称",
|
||||||
|
"sellPrice": "销售单价(元)",
|
||||||
|
"totalPrice": "小计(元)",
|
||||||
|
"total": "合计(元)",
|
||||||
|
"updateTime": "更新时间",
|
||||||
|
"city": "所属区域",
|
||||||
|
"address": "详细地址",
|
||||||
|
"completeOrder": "订单完成",
|
||||||
|
"delivery": "发货",
|
||||||
|
"sellDelivery": "销售单",
|
||||||
|
"sellQuantity": "出库数量",
|
||||||
|
"Enter product": "录入食材",
|
||||||
|
"Add product": "新增"
|
||||||
|
}
|
||||||
@@ -1,32 +1,36 @@
|
|||||||
{
|
{
|
||||||
"code":"产品编号",
|
"code": "食材编号",
|
||||||
"codePlaceholder":"请输入产品编号",
|
"codePlaceholderNew": "请输入食材编号",
|
||||||
"name":"产品名称",
|
"name": "食材名称",
|
||||||
"namePlaceholder":"请输入产品名称",
|
"namePlaceholder": "请输入食材名称",
|
||||||
"productTypeId":"产品类型",
|
"productTypeId": "食材类型",
|
||||||
"productTypeIdPlaceholder":"请输入产品类型",
|
"productTypeIdPlaceholder": "请输入食材类型",
|
||||||
"spec":"规格",
|
"spec": "规格",
|
||||||
"specPlaceholder":"请输入规格",
|
"specPlaceholder": "请输入规格",
|
||||||
"inventory":"产品库存",
|
"inventory": "食材库存",
|
||||||
"inventoryPlaceholder":"请输入产品库存",
|
"inventoryPlaceholder": "请输入食材库存",
|
||||||
"minWarning":"最低库存预警",
|
"minWarning": "最低库存预警",
|
||||||
"minWarningPlaceholder":"请输入最低库存预警",
|
"minWarningPlaceholder": "请输入最低库存预警",
|
||||||
"maxWarning":"最高库存预警",
|
"maxWarning": "最高库存预警",
|
||||||
"maxWarningPlaceholder":"请输入最高库存预警",
|
"maxWarningPlaceholder": "请输入最高库存预警",
|
||||||
"raise":"加价费用",
|
"raise": "加价费用",
|
||||||
"raisePlaceholder":"请输入加价费用",
|
"raisePlaceholder": "请输入加价费用",
|
||||||
"remark":"备注",
|
"remark": "备注",
|
||||||
"remarkPlaceholder":"请输入备注",
|
"remarkPlaceholder": "请输入备注",
|
||||||
"productUnitId":"单位",
|
"productUnitId": "单位",
|
||||||
"productUnitIdPlaceholder":"请输入单位",
|
"productUnitIdPlaceholder": "请输入单位",
|
||||||
"unit":"单位值",
|
"unit": "单位值",
|
||||||
"unitPlaceholder":"请输入单位值",
|
"unitPlaceholder": "请输入单位值",
|
||||||
"image":"图片",
|
"image": "图片",
|
||||||
"imagePlaceholder":"请输入",
|
"imagePlaceholder": "请上传图片",
|
||||||
"addProduct":"添加产品信息",
|
"addProduct": "添加食材信息",
|
||||||
"updateProduct":"编辑产品信息",
|
"updateProduct": "编辑食材信息",
|
||||||
"productDeleteTips":"确定要删除该数据吗?",
|
"productDeleteTips": "确定要删除该数据吗?",
|
||||||
"startDate":"请选择开始时间",
|
"startDate": "请选择开始时间",
|
||||||
"endDate":"请选择结束时间",
|
"endDate": "请选择结束时间",
|
||||||
"createTime":"创建时间"
|
"createTime": "创建时间",
|
||||||
|
"expiryTerm": "保质期时长(天)",
|
||||||
|
"expiryTermPlaceholder": "请输入保质期时长",
|
||||||
|
"expiryAlertTerm": "临期报警时长(天)",
|
||||||
|
"expiryAlertTermPlaceholder": "请输入临期报警时长"
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"code": "产品编号",
|
"code": "食材编号",
|
||||||
"name": "产品名称",
|
"name": "食材名称",
|
||||||
"productTypeId": "产品类型",
|
"productTypeId": "食材类型",
|
||||||
"spec": "规格",
|
"spec": "规格",
|
||||||
"inventory": "产品库存",
|
"inventory": "食材库存",
|
||||||
"minWarning": "最低库存预警",
|
"minWarning": "最低库存预警",
|
||||||
"maxWarning": "最高库存预警",
|
"maxWarning": "最高库存预警",
|
||||||
"raise": "加价费用",
|
"raise": "加价费用",
|
||||||
@@ -13,5 +13,7 @@
|
|||||||
"unitPlaceholder": "请输入单位值",
|
"unitPlaceholder": "请输入单位值",
|
||||||
"image": "图片",
|
"image": "图片",
|
||||||
"productDeleteTips": "确定要删除该数据吗?",
|
"productDeleteTips": "确定要删除该数据吗?",
|
||||||
"createTime": "创建时间"
|
"createTime": "创建时间",
|
||||||
|
"expiryTerm": "保质期时长(天)",
|
||||||
|
"expiryAlertTerm": "临期报警时长(天)"
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"code":"产品编号",
|
"code":"食材编号",
|
||||||
"codePlaceholder":"请输入产品编号",
|
"codePlaceholder":"请输入食材编号",
|
||||||
"name":"产品名称",
|
"name":"食材名称",
|
||||||
"namePlaceholder":"请输入产品名称",
|
"namePlaceholder":"请输入食材名称",
|
||||||
"productTypeId":"产品类型",
|
"productTypeId":"食材类型",
|
||||||
"productTypeIdPlaceholder":"请输入产品类型",
|
"productTypeIdPlaceholder":"请输入食材类型",
|
||||||
"spec":"产品规格",
|
"spec":"食材规格",
|
||||||
"specPlaceholder":"请输入规格",
|
"specPlaceholder":"请输入规格",
|
||||||
"inventory":"产品库存",
|
"inventory":"食材库存",
|
||||||
"inventoryPlaceholder":"请输入产品库存",
|
"inventoryPlaceholder":"请输入食材库存",
|
||||||
"minWarning":"最低库存预警",
|
"minWarning":"最低库存预警",
|
||||||
"minWarningPlaceholder":"请输入最低库存预警",
|
"minWarningPlaceholder":"请输入最低库存预警",
|
||||||
"maxWarning":"最高库存预警",
|
"maxWarning":"最高库存预警",
|
||||||
@@ -17,18 +17,20 @@
|
|||||||
"raisePlaceholder":"请输入加价费用",
|
"raisePlaceholder":"请输入加价费用",
|
||||||
"remark":"备注",
|
"remark":"备注",
|
||||||
"remarkPlaceholder":"请输入备注",
|
"remarkPlaceholder":"请输入备注",
|
||||||
"productUnitId":"产品单位",
|
"productUnitId":"食材单位",
|
||||||
"productUnitIdPlaceholder":"请输入单位",
|
"productUnitIdPlaceholder":"请输入单位",
|
||||||
"unit":"单位值",
|
"unit":"单位值",
|
||||||
"unitPlaceholder":"请输入单位值",
|
"unitPlaceholder":"请输入单位值",
|
||||||
"image":"图片",
|
"image":"图片",
|
||||||
"imagePlaceholder":"请输入",
|
"imagePlaceholder":"请输入",
|
||||||
"addProduct":"添加产品信息",
|
"addProduct":"添加食材信息",
|
||||||
"updateProduct":"编辑产品信息",
|
"updateProduct":"编辑食材信息",
|
||||||
"productDeleteTips":"确定要删除该数据吗?",
|
"productDeleteTips":"确定要删除该数据吗?",
|
||||||
"startDate":"请选择开始时间",
|
"startDate":"请选择开始时间",
|
||||||
"endDate":"请选择结束时间",
|
"endDate":"请选择结束时间",
|
||||||
"createTime":"创建时间",
|
"createTime":"创建时间",
|
||||||
"info": "详情",
|
"info": "详情",
|
||||||
"delete": "删除"
|
"delete": "删除",
|
||||||
|
"expiryTerm": "保质期时长(天)",
|
||||||
|
"expiryAlertTerm": "临期报警时长(天)"
|
||||||
}
|
}
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"code":"产品编号",
|
"code":"食材编号",
|
||||||
"name":"产品名称",
|
"name":"食材名称",
|
||||||
"productTypeId":"产品类型",
|
"productTypeId":"食材类型",
|
||||||
"spec":"产品规格",
|
"spec":"食材规格",
|
||||||
"inventory":"产品库存",
|
"inventory":"食材库存",
|
||||||
"minWarning":"最低库存预警",
|
"minWarning":"最低库存预警",
|
||||||
"maxWarning":"最高库存预警",
|
"maxWarning":"最高库存预警",
|
||||||
"raise":"加价费用",
|
"raise":"加价费用",
|
||||||
"remark":"备注",
|
"remark":"备注",
|
||||||
"productUnitId":"产品单位",
|
"productUnitId":"食材单位",
|
||||||
"unit":"单位值",
|
"unit":"单位值",
|
||||||
"addProduct":"添加产品信息",
|
"addProduct":"添加食材信息",
|
||||||
"updateProduct":"编辑产品信息",
|
"updateProduct":"编辑食材信息",
|
||||||
"createTime":"创建时间",
|
"createTime":"创建时间",
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"confirmChoose": "确认选择"
|
"confirmChoose": "确认选择"
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
{
|
{
|
||||||
"code": "编码",
|
"code": "退货单号",
|
||||||
"codePlaceholder": "请输入编码",
|
"codePlaceholderNew": "请输入退货单号",
|
||||||
"supplierId": "供应商ID",
|
"supplierId": "供应商ID",
|
||||||
"supplierName": "供应商",
|
"supplierName": "供应商",
|
||||||
"supplierIdPlaceholder": "请输入供应商ID",
|
"supplierIdPlaceholder": "请选择供应商",
|
||||||
"supplierNamePlaceholder": "请输入供应商",
|
"supplierNamePlaceholder": "请选择供应商",
|
||||||
|
"outboundImage": "图片",
|
||||||
|
"outboundImagePlaceholder": "请上传图片",
|
||||||
"warehouseId": "仓库ID",
|
"warehouseId": "仓库ID",
|
||||||
"warehouseName": "仓库",
|
"warehouseName": "仓库",
|
||||||
"warehouseIdPlaceholder": "请输入仓库ID",
|
"warehouseIdPlaceholder": "请选择仓库",
|
||||||
"billingTime": "制单时间",
|
"billingTime": "制单时间",
|
||||||
"billingTimePlaceholder": "请输入制单时间",
|
"billingTimePlaceholder": "请输入制单时间",
|
||||||
"remark": "备注",
|
"remark": "退货原因",
|
||||||
"remarkPlaceholder": "请输入备注",
|
"remarkPlaceholder": "请输入退货原因",
|
||||||
|
"image": "图片",
|
||||||
|
"imagePlaceholder": "请上传图片",
|
||||||
"reviewerId": "审核人",
|
"reviewerId": "审核人",
|
||||||
"reviewerIdPlaceholder": "请输入审核人",
|
"reviewerIdPlaceholder": "请输入审核人",
|
||||||
"money": "退款金额",
|
"money": "退款金额",
|
||||||
@@ -23,11 +27,11 @@
|
|||||||
"status": "状态",
|
"status": "状态",
|
||||||
"addRetire": "添加",
|
"addRetire": "添加",
|
||||||
"infoRetire": "退货单详情",
|
"infoRetire": "退货单详情",
|
||||||
"productCode": "产品编号",
|
"productCode": "食材编号",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productUnitId": "产品单位",
|
"productUnitId": "食材单位",
|
||||||
"productTypeId": "产品分类",
|
"productTypeId": "食材分类",
|
||||||
|
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"retireQuantity": "退货数量",
|
"retireQuantity": "退货数量",
|
||||||
@@ -36,6 +40,6 @@
|
|||||||
"total": "合计(元)",
|
"total": "合计(元)",
|
||||||
"updateTime": "更新时间",
|
"updateTime": "更新时间",
|
||||||
|
|
||||||
"Enter product": "录入产品",
|
"Enter product": "录入食材",
|
||||||
"Add product": "新增"
|
"Add product": "新增"
|
||||||
}
|
}
|
||||||
@@ -17,11 +17,11 @@
|
|||||||
"status": "状态",
|
"status": "状态",
|
||||||
"addRetire": "添加",
|
"addRetire": "添加",
|
||||||
"infoRetire": "退货单详情",
|
"infoRetire": "退货单详情",
|
||||||
"productCode": "产品编号",
|
"productCode": "食材编号",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productUnitId": "产品单位",
|
"productUnitId": "食材单位",
|
||||||
"productTypeId": "产品分类",
|
"productTypeId": "食材分类",
|
||||||
|
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"retireQuantity": "退货数量",
|
"retireQuantity": "退货数量",
|
||||||
@@ -30,5 +30,5 @@
|
|||||||
"total": "合计(元)",
|
"total": "合计(元)",
|
||||||
"updateTime": "更新时间",
|
"updateTime": "更新时间",
|
||||||
|
|
||||||
"Product List": "产品列表"
|
"Product List": "食材列表"
|
||||||
}
|
}
|
||||||
@@ -15,11 +15,11 @@
|
|||||||
"status": "状态",
|
"status": "状态",
|
||||||
"addRetire": "添加",
|
"addRetire": "添加",
|
||||||
"infoRetire": "退货单详情",
|
"infoRetire": "退货单详情",
|
||||||
"productCode": "产品编号",
|
"productCode": "食材编号",
|
||||||
"productSpec": "产品规格",
|
"productSpec": "食材规格",
|
||||||
"productName": "产品名称",
|
"productName": "食材名称",
|
||||||
"productUnitId": "产品单位",
|
"productUnitId": "食材单位",
|
||||||
"productTypeId": "产品分类",
|
"productTypeId": "食材分类",
|
||||||
|
|
||||||
"choose": "选择",
|
"choose": "选择",
|
||||||
"retireQuantity": "退货数量",
|
"retireQuantity": "退货数量",
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "单据编号",
|
|
||||||
"purchaseCode": "采购单号",
|
|
||||||
"supplierName": "供应商",
|
|
||||||
"contact": "联系人",
|
|
||||||
"phone": "联系方式",
|
|
||||||
"billingTime": "制单时间",
|
|
||||||
"deliveryTime": "交货日期",
|
|
||||||
"totalNum": "入库数量",
|
|
||||||
"rate": "税率",
|
|
||||||
"money": "总金额",
|
|
||||||
"partitionId": "库区",
|
|
||||||
"warehouseId": "仓库编号",
|
|
||||||
"theWay": "交货方式",
|
|
||||||
"city": "所属区域",
|
|
||||||
"address": "详细地址",
|
|
||||||
"stromanId": "入库人",
|
|
||||||
"status": "入库单状态",
|
|
||||||
"remark": "备注",
|
|
||||||
"addStorage": "添加入库",
|
|
||||||
"updateStorage": "编辑入库",
|
|
||||||
"infoStorage": "入库单详情",
|
|
||||||
"updateTime": "更新时间",
|
|
||||||
"createTime": "创建时间",
|
|
||||||
"productCode": "产品编号",
|
|
||||||
"productName": "产品名称",
|
|
||||||
"productTypeId": "产品分类",
|
|
||||||
"productSpec": "产品规格",
|
|
||||||
"productUnitId": "产品单位",
|
|
||||||
"purchaseQuantity": "入库数",
|
|
||||||
"purchasePrice": "单价(元)",
|
|
||||||
"totalPrice": "小计(元)",
|
|
||||||
"total": "合计(元)",
|
|
||||||
"Product List": "产品列表"
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "单据编号",
|
|
||||||
"codePlaceholder": "请输入单据编号",
|
|
||||||
"purchaseCode": "采购单号",
|
|
||||||
"purchaseIdPlaceholder": "请输入采购单号",
|
|
||||||
"supplierName": "供应商",
|
|
||||||
"supplierIdPlaceholder": "请输入供应商编号",
|
|
||||||
"contact": "联系人",
|
|
||||||
"phone": "联系方式",
|
|
||||||
"adminId": "入库单录入人员",
|
|
||||||
"billingTime": "制单时间",
|
|
||||||
"deliveryTime": "交货日期",
|
|
||||||
"totalNum": "入库数量",
|
|
||||||
"rate": "税率",
|
|
||||||
"money": "总金额",
|
|
||||||
"partitionId": "库区",
|
|
||||||
"warehouseId": "仓库编号",
|
|
||||||
"theWay": "交货方式",
|
|
||||||
"city": "所属区域",
|
|
||||||
"address": "详细地址",
|
|
||||||
"stromanId": "入库人",
|
|
||||||
"status": "入库单状态",
|
|
||||||
"remark": "备注",
|
|
||||||
"createTime": "创建时间",
|
|
||||||
"updateTime": "更新时间",
|
|
||||||
"productCode": "产品编号",
|
|
||||||
"productName": "产品名称",
|
|
||||||
"productTypeId": "产品分类",
|
|
||||||
"productSpec": "产品规格",
|
|
||||||
"productUnitId": "产品单位",
|
|
||||||
"purchaseQuantity": "入库数",
|
|
||||||
"purchasePrice": "单价(元)",
|
|
||||||
"totalPrice": "小计(元)",
|
|
||||||
"total": "合计(元)"
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "单据编号",
|
|
||||||
"codePlaceholder": "请输入单据编号",
|
|
||||||
"sellCode": "销售单单号",
|
|
||||||
"sellCodePlaceholder": "请输入销售单单号",
|
|
||||||
"sellId": "销售单ID",
|
|
||||||
"sellIdPlaceholder": "请输入销售单ID",
|
|
||||||
"customerId": "客户ID",
|
|
||||||
"customerName": "客户名称",
|
|
||||||
"customerIdPlaceholder": "请输入客户ID",
|
|
||||||
"contact": "联系人",
|
|
||||||
"contactPlaceholder": "请输入联系人",
|
|
||||||
"phone": "联系方式",
|
|
||||||
"phonePlaceholder": "请输入联系方式",
|
|
||||||
"billingTime": "制单时间",
|
|
||||||
"billingTimePlaceholder": "请输入制单时间",
|
|
||||||
"deliveryTime": "交货日期",
|
|
||||||
"deliveryTimePlaceholder": "请输入交货日期",
|
|
||||||
"totalNum": "数量",
|
|
||||||
"totalNumPlaceholder": "请输入合计",
|
|
||||||
"type": "交货方式",
|
|
||||||
"typePlaceholder": "请输入交货方式",
|
|
||||||
"city": "所属区域",
|
|
||||||
"cityPlaceholder": "请输入所属区域",
|
|
||||||
"address": "详细地址",
|
|
||||||
"addressPlaceholder": "请输入详细地址",
|
|
||||||
"status": "状态",
|
|
||||||
"statusPlaceholder": "请输入状态",
|
|
||||||
"remark": "备注",
|
|
||||||
"remarkPlaceholder": "请输入备注",
|
|
||||||
"addDelivery": "添加出库单",
|
|
||||||
"updateDelivery": "编辑出库单",
|
|
||||||
"infoDelivery": "出库单详情",
|
|
||||||
"deliveryDeleteTips": "确定要删除该数据吗?",
|
|
||||||
"startDate": "请选择开始时间",
|
|
||||||
"endDate": "请选择结束时间",
|
|
||||||
|
|
||||||
"productCode": "产品编号",
|
|
||||||
"productName": "产品名称",
|
|
||||||
"productList": "产品列表",
|
|
||||||
"productTypeId": "产品分类",
|
|
||||||
"productSpec": "产品规格",
|
|
||||||
"productUnitId": "产品单位",
|
|
||||||
"choose": "选择",
|
|
||||||
"quantity": "数量",
|
|
||||||
"deliveryQuantity": "出库数量",
|
|
||||||
"inventory": "库存",
|
|
||||||
"canUseInventory": "可用库存",
|
|
||||||
"warehouseName": "仓库名称",
|
|
||||||
"warehousePlaceholder": "请选择仓库",
|
|
||||||
"sellPrice": "销售单价(元)",
|
|
||||||
"totalPrice": "小计(元)",
|
|
||||||
"total": "合计(元)",
|
|
||||||
|
|
||||||
|
|
||||||
"delivery": "发货",
|
|
||||||
"sellDelivery": "销售单",
|
|
||||||
"sellDeliveryPlaceholder": "请选择销售单",
|
|
||||||
"sellQuantity": "出库数量"
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "单据编号",
|
|
||||||
"sellCode": "销售单号",
|
|
||||||
"sellId": "销售单ID",
|
|
||||||
"customerId": "客户ID",
|
|
||||||
"customerName": "客户名称",
|
|
||||||
"contact": "联系人",
|
|
||||||
"phone": "联系方式",
|
|
||||||
"billingTime": "制单时间",
|
|
||||||
"deliveryTime": "交货日期",
|
|
||||||
"totalNum": "数量",
|
|
||||||
"address": "详细地址",
|
|
||||||
"status": "状态",
|
|
||||||
"remark": "备注",
|
|
||||||
"city": "所属区域",
|
|
||||||
"productCode": "产品编号",
|
|
||||||
"productName": "产品名称",
|
|
||||||
"productTypeId": "产品分类",
|
|
||||||
"productSpec": "产品规格",
|
|
||||||
"productUnitId": "产品单位",
|
|
||||||
"choose": "选择",
|
|
||||||
"quantity": "数量",
|
|
||||||
"deliveryQuantity": "出库数量",
|
|
||||||
"inventory": "库存",
|
|
||||||
"canUseInventory": "可用库存",
|
|
||||||
"warehouseName": "仓库名称",
|
|
||||||
"sellPrice": "销售单价(元)",
|
|
||||||
"totalPrice": "小计(元)",
|
|
||||||
"total": "合计(元)",
|
|
||||||
|
|
||||||
"type": "交货方式",
|
|
||||||
"delivery": "发货",
|
|
||||||
"Product List": "产品列表"
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "单据编号",
|
|
||||||
"sellCode": "销售单号",
|
|
||||||
"sellId": "销售单ID",
|
|
||||||
"customerId": "客户ID",
|
|
||||||
"customerName": "客户名称",
|
|
||||||
"linkman": "联系人",
|
|
||||||
"phone": "联系方式",
|
|
||||||
"billingTime": "制单时间",
|
|
||||||
"deliveryTime": "交货日期",
|
|
||||||
"totalNum": "数量",
|
|
||||||
"address": "详细地址",
|
|
||||||
"status": "状态",
|
|
||||||
"remark": "备注",
|
|
||||||
"productCode": "产品编号",
|
|
||||||
"productName": "产品名称",
|
|
||||||
"productTypeId": "产品分类",
|
|
||||||
"productSpec": "产品规格",
|
|
||||||
"productUnitId": "产品单位",
|
|
||||||
"choose": "选择",
|
|
||||||
"quantity": "数量",
|
|
||||||
"deliveryQuantity": "出库数量",
|
|
||||||
"inventory": "库存",
|
|
||||||
"canUseInventory": "可用库存",
|
|
||||||
"warehouseName": "仓库名称",
|
|
||||||
"sellPrice": "销售单价(元)",
|
|
||||||
"totalPrice": "小计(元)",
|
|
||||||
"total": "合计(元)",
|
|
||||||
|
|
||||||
"contact": "联系人",
|
|
||||||
|
|
||||||
"delivery": "发货",
|
|
||||||
"sellDelivery": "销售单",
|
|
||||||
"sellQuantity": "出库数量"
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "单据编号",
|
|
||||||
"codePlaceholder": "请输入单据编号",
|
|
||||||
"sellId": "销售单ID",
|
|
||||||
"sellIdPlaceholder": "请输入销售单ID",
|
|
||||||
"sellCode": "销售单单号",
|
|
||||||
"sellCodePlaceholder": "请输入销售单单号",
|
|
||||||
"customerId": "客户ID",
|
|
||||||
"customerName": "客户名称",
|
|
||||||
"customerIdPlaceholder": "请输入客户ID",
|
|
||||||
"status": "状态",
|
|
||||||
"statusPlaceholder": "请输入状态",
|
|
||||||
"addSellReturn": "添加退货单",
|
|
||||||
"updateSellReturn": "编辑退货单",
|
|
||||||
"sellReturnDeleteTips": "确定要删除该数据吗?",
|
|
||||||
"startDate": "请选择开始时间",
|
|
||||||
"endDate": "请选择结束时间",
|
|
||||||
"sellList": "销售单",
|
|
||||||
"contact": "联系人",
|
|
||||||
"contactPlaceholder": "请输入联系人",
|
|
||||||
"phone": "联系方式",
|
|
||||||
"phonePlaceholder": "请输入联系方式",
|
|
||||||
"billingTime": "制单时间",
|
|
||||||
"billingTimePlaceholder": "请输入制单时间",
|
|
||||||
"remark": "备注",
|
|
||||||
"remarkPlaceholder": "请输入备注",
|
|
||||||
"productCode": "产品编号",
|
|
||||||
"productList": "产品列表",
|
|
||||||
"warehouseName": "仓库名称",
|
|
||||||
"warehousePlaceholder": "请输入仓库名称",
|
|
||||||
"productName": "产品名称",
|
|
||||||
"productTypeId": "产品分类",
|
|
||||||
"productSpec": "产品规格",
|
|
||||||
"productUnitId": "产品单位",
|
|
||||||
"choose": "选择",
|
|
||||||
"quantity": "数量",
|
|
||||||
"returnQuantity": "退货数量",
|
|
||||||
"sellQuantity": "销售数量",
|
|
||||||
"sellPrice": "单价",
|
|
||||||
"totalPrice": "小计(元)",
|
|
||||||
"total": "合计(元)",
|
|
||||||
"sellDeliveryPlaceholder": "请选择销售单"
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "单据编号",
|
|
||||||
"sellId": "销售单ID",
|
|
||||||
"sellCode": "销售单单号",
|
|
||||||
"customerId": "客户ID",
|
|
||||||
"customerName": "客户名称",
|
|
||||||
"status": "状态",
|
|
||||||
"contact": "联系人",
|
|
||||||
"phone": "联系方式",
|
|
||||||
"billingTime": "制单时间",
|
|
||||||
"address": "详细地址",
|
|
||||||
"remark": "备注",
|
|
||||||
"productCode": "产品编号",
|
|
||||||
"warehouseName": "仓库名称",
|
|
||||||
"productName": "产品名称",
|
|
||||||
"productTypeId": "产品分类",
|
|
||||||
"productSpec": "产品规格",
|
|
||||||
"productUnitId": "产品单位",
|
|
||||||
"choose": "选择",
|
|
||||||
"quantity": "数量",
|
|
||||||
"returnQuantity": "退货数量",
|
|
||||||
"sellQuantity": "销售数量",
|
|
||||||
"sellPrice": "单价",
|
|
||||||
"totalPrice": "小计(元)",
|
|
||||||
"total": "合计(元)",
|
|
||||||
"Product List": "产品列表"
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"code": "单据编号",
|
|
||||||
"sellId": "销售单ID",
|
|
||||||
"sellCode": "销售单单号",
|
|
||||||
"customerId": "客户ID",
|
|
||||||
"customerName": "客户名称",
|
|
||||||
"status": "状态",
|
|
||||||
"contact": "联系人",
|
|
||||||
"phone": "联系方式",
|
|
||||||
"billingTime": "制单时间",
|
|
||||||
"address": "详细地址",
|
|
||||||
"remark": "备注",
|
|
||||||
"productCode": "产品编号",
|
|
||||||
"warehouseName": "仓库名称",
|
|
||||||
"productName": "产品名称",
|
|
||||||
"productTypeId": "产品分类",
|
|
||||||
"productSpec": "产品规格",
|
|
||||||
"productUnitId": "产品单位",
|
|
||||||
"choose": "选择",
|
|
||||||
"quantity": "数量",
|
|
||||||
"returnQuantity": "退货数量",
|
|
||||||
"sellQuantity": "销售数量",
|
|
||||||
"sellPrice": "单价",
|
|
||||||
"totalPrice": "小计(元)",
|
|
||||||
"total": "合计(元)"
|
|
||||||
}
|
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
{
|
{
|
||||||
"dataSummary": "数据汇总",
|
"dataSummary": "今日汇总",
|
||||||
"updateTime": "更新时间",
|
"updateTime": "更新时间",
|
||||||
"todayPurchaseCount": "今日采购订单数",
|
"todayPurchaseCount": "今日入库订单数",
|
||||||
"purchaseCount": "采购订单总数",
|
"purchaseCount": "采购订单总数",
|
||||||
"yesterday": "昨日",
|
"yesterday": "昨日",
|
||||||
"todayPurchaseSale": "今日采购金额",
|
"todayPurchaseSale": "今日入库金额数",
|
||||||
"purchaseTotal": "采购总额(元)",
|
"purchaseTotal": "采购总额(元)",
|
||||||
"todaySellCount": "今日销售订单数",
|
"todaySellCount": "今日出库订单数",
|
||||||
"sellCount": "销售订单总数",
|
"sellCount": "销售订单总数",
|
||||||
"todaySellSale": "今日销售金额",
|
"todaySellSale": "今日出库金额数",
|
||||||
"salesTotal": "销售总额(元)",
|
"salesTotal": "销售总额(元)",
|
||||||
"agentMatters": "代办事项",
|
"agentMatters": "代办事项",
|
||||||
"waitApprovePurchase": "待审核采购单",
|
"waitApprovePurchase": "采购待入库数",
|
||||||
"waitInventoryPurchase": "待入库订单",
|
"waitInventoryPurchase": "食堂待出库数",
|
||||||
"waitReturnPurchase": "待退货采购单",
|
"waitReturnPurchase": "采购退货待审核数",
|
||||||
"waitSellOrder": "待审核销售单",
|
"waitSellOrder": "食堂退货待审核数",
|
||||||
"waitDeliveryOrder": "待出库销售单",
|
"waitDeliveryOrder": "采购退货待出库数",
|
||||||
"waitReturnOrder": "待退货销售单"
|
"waitReturnOrder": "食堂退货待入库数"
|
||||||
}
|
}
|
||||||
@@ -3,41 +3,62 @@
|
|||||||
<u-form labelPosition="left" :model="formData" errorType='toast' :rules="rules" ref="formRef" labelWidth="180rpx">
|
<u-form labelPosition="left" :model="formData" errorType='toast' :rules="rules" ref="formRef" labelWidth="180rpx">
|
||||||
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
||||||
<view>
|
<view>
|
||||||
<u-form-item :label="t('name')" prop="name" required borderBottom>
|
<u-form-item :label="t('code')" prop="code" required borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model.trim="formData.name" border="none" clearable placeholderStyle="color: #888" :placeholder="t('namePlaceholder')"/>
|
<u-input fontSize="28rpx" v-model.trim="formData.code" disabled clearable placeholderStyle="color: #888" :placeholder="t('codePlaceholderNew')"/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<u-form-item :label="t('name')" prop="name" required borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.name" clearable placeholderStyle="color: #888" :placeholder="t('namePlaceholder')"/>
|
||||||
|
</u-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'仓库'" prop="warehouse_id" required borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.warehouse_id" :localdata="warehouseList" dataKey="name"
|
||||||
|
dataValue="id" clear placeholder="请选择仓库" @change="warehouseIdChange" />
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.warehouse_id" :options="warehouseList" dataKey="name"
|
||||||
|
dataValue="id" clearable placeholder="请选择仓库" :height="38" @change="warehouseIdChange" />
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('contact')" prop="contact" required borderBottom>
|
<u-form-item :label="t('contact')" prop="contact" required borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model="formData.contact" :placeholder="t('contactPlaceholder')" border="none"></u-input>
|
<u-input fontSize="28rpx" v-model="formData.contact" :placeholder="t('contactPlaceholder')" ></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('phone')" prop="phone" required borderBottom>
|
<u-form-item :label="t('phone')" prop="phone" required borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model.trim="formData.phone" type="number" maxlength="11" border="none" clearable :placeholder="t('phonePlaceholder')" placeholderStyle="color: #888"/>
|
<u-input fontSize="28rpx" v-model.trim="formData.phone" type="number" maxlength="11" clearable :placeholder="t('phonePlaceholder')" placeholderStyle="color: #888"/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('telephone')" prop="telephone" borderBottom>
|
<u-form-item :label="t('telephone')" prop="telephone" borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model="formData.telephone" :placeholder="t('telephonePlaceholder')" border="none"></u-input>
|
<u-input fontSize="28rpx" v-model="formData.telephone" :placeholder="t('telephonePlaceholder')" ></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('city')" prop="cityName" borderBottom>
|
<up-form-item :label="'食堂审领人'" prop="salesman_id" borderBottom>
|
||||||
<view class="flex w-full items-center h-[52rpx]" @click="selectArea">
|
<!-- #ifdef H5 -->
|
||||||
<view v-if="!formData.cityName" class="text-[#888] text-[28rpx] flex-1">{{ t('cityPlaceholder') }}</view>
|
<zxz-uni-data-select v-model="formData.salesman_id" :localdata="siteUser" dataKey="username"
|
||||||
<view v-else class="text-[28rpx] flex-1 leading-[1.4]">{{ formData.cityName }}</view>
|
dataValue="uid" clear placeholder="请选择食堂审领人" @change="salesmanIdChange" />
|
||||||
</view>
|
<!-- #endif -->
|
||||||
</u-form-item>
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.salesman_id" :options="siteUser" dataKey="username"
|
||||||
|
dataValue="uid" clearable placeholder="请选择食堂审领人" :height="38" @change="salesmanIdChange" />
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('address')" prop="address" borderBottom>
|
<u-form-item :label="t('address')" prop="address" borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model="formData.address" border="none" clearable maxlength="120" :placeholder="t('addressPlaceholder')" placeholderStyle="color: #888"/>
|
<u-input fontSize="28rpx" v-model="formData.address" clearable maxlength="120" :placeholder="t('addressPlaceholder')" placeholderStyle="color: #888"/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('description')" prop="description">
|
<u-form-item :label="t('description')" prop="description">
|
||||||
<u-textarea fontSize="28rpx" v-model="formData.description" :placeholder="t('descriptionPlaceholder')" border="none"></u-textarea>
|
<u-textarea fontSize="28rpx" v-model="formData.description" :placeholder="t('descriptionPlaceholder')" ></u-textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -56,10 +77,18 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, computed } from 'vue'
|
import { ref, reactive, computed } from 'vue'
|
||||||
|
import { onLoad, onReady, onShow } from '@dcloudio/uni-app';
|
||||||
import { t } from '@/locale'
|
import { t } from '@/locale'
|
||||||
import { addCustomer } from '@/addon/erp/api/base';
|
import { addCustomer,getusersList,getWarehouseSelect} from '@/addon/erp/api/base';
|
||||||
import { generatedCode } from '@/addon/erp/utils/common';
|
import { generatedCode } from '@/addon/erp/utils/common';
|
||||||
import { redirect } from '@/utils/common';
|
import { redirect } from '@/utils/common';
|
||||||
|
import { checkBtnPermission } from '@/utils/auth';
|
||||||
|
import useMemberStore from '@/stores/member'
|
||||||
|
interface Warehouse {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
const memberStore = useMemberStore()
|
||||||
|
|
||||||
const formRef: any = ref(null)
|
const formRef: any = ref(null)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@@ -67,14 +96,28 @@
|
|||||||
const areaRef = ref()
|
const areaRef = ref()
|
||||||
const isSelectAddress = ref(false)
|
const isSelectAddress = ref(false)
|
||||||
|
|
||||||
|
const warehouseList = ref<Warehouse[]>([]);
|
||||||
|
|
||||||
const rules = computed(() => {
|
const rules = computed(() => {
|
||||||
return {
|
return {
|
||||||
'name': {
|
// 'code': {
|
||||||
|
// type: 'string',
|
||||||
|
// required: true,
|
||||||
|
// message: t('codePlaceholderNew'),
|
||||||
|
// trigger: ['blur', 'change'],
|
||||||
|
// },
|
||||||
|
'name': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
message: t('namePlaceholder'),
|
message: t('namePlaceholder'),
|
||||||
trigger: ['blur', 'change'],
|
trigger: ['blur', 'change'],
|
||||||
},
|
},
|
||||||
|
'warehouse_id': {
|
||||||
|
type: 'number',
|
||||||
|
required: true,
|
||||||
|
message: '请选择仓库',
|
||||||
|
trigger: ['change'],
|
||||||
|
},
|
||||||
'contact': {
|
'contact': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
@@ -109,16 +152,31 @@
|
|||||||
telephone: '',
|
telephone: '',
|
||||||
city: '',
|
city: '',
|
||||||
cityName: '',
|
cityName: '',
|
||||||
|
salesman_id: '',
|
||||||
|
warehouse_id: '',
|
||||||
address: '',
|
address: '',
|
||||||
description: ''
|
description: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onLoad((option : any) => {
|
||||||
|
getAllUserList()
|
||||||
|
getWarehouseSelectList()
|
||||||
|
})
|
||||||
|
const getWarehouseSelectList= ()=>{
|
||||||
|
getWarehouseSelect().then(res =>{
|
||||||
|
warehouseList.value=res.data|| []
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const warehouseIdChange = (e : any) => {
|
||||||
|
formData.warehouse_id = e?.id ||''
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validateField('warehouse_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
const selectArea = () => {
|
const selectArea = () => {
|
||||||
isSelectAddress.value = true
|
isSelectAddress.value = true
|
||||||
areaRef.value.open()
|
areaRef.value.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
const areaSelectComplete = (event: any) => {
|
const areaSelectComplete = (event: any) => {
|
||||||
let cityArr = [] as any[];
|
let cityArr = [] as any[];
|
||||||
cityArr = [event.province.id || 0, event.city.id || 0, event.district.id || 0];
|
cityArr = [event.province.id || 0, event.city.id || 0, event.district.id || 0];
|
||||||
@@ -127,9 +185,31 @@
|
|||||||
formData.cityName = `${event.province.name || ''}${event.city.name || ''}${event.district.name || ''}`
|
formData.cityName = `${event.province.name || ''}${event.city.name || ''}${event.district.name || ''}`
|
||||||
isSelectAddress.value = false;
|
isSelectAddress.value = false;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 食堂审领人
|
||||||
|
*/
|
||||||
|
const siteUser = ref<any[]>([]);
|
||||||
|
const salesmanIdChange = (e : any) => {
|
||||||
|
formData.salesman_id = e?.uid || ''
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validateField('salesman_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取食堂审领人
|
||||||
|
const getAllUserList = () => {
|
||||||
|
getusersList({page:1,limit:120}).then((res : any) => {
|
||||||
|
siteUser.value = res.data.data || [];
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// 保存
|
// 保存
|
||||||
const handSave = () => {
|
const handSave = async() => {
|
||||||
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_base_customer_add')
|
||||||
|
if (!hasPermission) return
|
||||||
formRef.value.validate().then(() => {
|
formRef.value.validate().then(() => {
|
||||||
if (loading.value) return
|
if (loading.value) return
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|||||||
@@ -18,9 +18,6 @@
|
|||||||
<up-form-item :label="t('telephone')" borderBottom>
|
<up-form-item :label="t('telephone')" borderBottom>
|
||||||
{{formData.telephone}}
|
{{formData.telephone}}
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
<up-form-item :label="t('city')" borderBottom>
|
|
||||||
{{formData.cityName}}
|
|
||||||
</up-form-item>
|
|
||||||
<up-form-item :label="t('address')" borderBottom>
|
<up-form-item :label="t('address')" borderBottom>
|
||||||
{{formData.address}}
|
{{formData.address}}
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
|
|||||||
@@ -5,45 +5,68 @@
|
|||||||
labelWidth="160rpx">
|
labelWidth="160rpx">
|
||||||
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
||||||
<view>
|
<view>
|
||||||
|
<u-form-item :label="t('code')" prop="code" borderBottom required>
|
||||||
|
<u-input fontSize="28rpx" v-model="formData.code" :placeholder="t('codePlaceholderNew')" disabled ></u-input>
|
||||||
|
</u-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('name')" prop="name" borderBottom required>
|
<u-form-item :label="t('name')" prop="name" borderBottom required>
|
||||||
<u-input fontSize="28rpx" v-model="formData.name" :placeholder="t('namePlaceholder')" border="none"></u-input>
|
<u-input fontSize="28rpx" v-model="formData.name" :placeholder="t('namePlaceholder')" ></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('contact')" prop="contact" borderBottom required>
|
<u-form-item :label="t('contact')" prop="contact" borderBottom required>
|
||||||
<u-input fontSize="28rpx" v-model="formData.contact" :placeholder="t('contactPlaceholder')"
|
<u-input fontSize="28rpx" v-model="formData.contact" :placeholder="t('contactPlaceholder')"
|
||||||
border="none"></u-input>
|
></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('phone')" prop="phone" borderBottom required>
|
<u-form-item :label="t('phone')" prop="phone" borderBottom required>
|
||||||
<u-input fontSize="28rpx" v-model="formData.phone" type="number" maxlength="11" :placeholder="t('phonePlaceholder')" border="none"></u-input>
|
<u-input fontSize="28rpx" v-model="formData.phone" type="number" maxlength="11" :placeholder="t('phonePlaceholder')" ></u-input>
|
||||||
|
</u-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<u-form-item :label="t('productType')" prop="product_type" borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="productTypes" multiple dataKey="name" dataValue="id" :localdata="productTypeData" :placeholder="t('productTypePlaceholder')"
|
||||||
|
@change="productTypeChange"></zxz-uni-data-select>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.product_type_id" :options="productTypeData" dataKey="name" dataValue="id" :placeholder="t('productTypePlaceholder')" :height="38"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</u-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<u-form-item :label="t('merchantMobile')" prop="mobile" borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model="formData.mobile" type="number" maxlength="11" :placeholder="t('merchantMobilePlaceholder')" ></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('term')" prop="term" borderBottom>
|
<u-form-item :label="t('term')" prop="term" borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model="formData.term" type="number" :placeholder="t('termPlaceholder')" border="none"></u-input>
|
<u-input fontSize="28rpx" v-model="formData.term" type="number" :placeholder="t('termPlaceholder')" ></u-input>
|
||||||
</u-form-item>
|
|
||||||
</view>
|
|
||||||
<view class="mt-[16rpx]">
|
|
||||||
<u-form-item :label="t('city')" prop="cityName" borderBottom>
|
|
||||||
<view class="flex w-full items-center h-[52rpx]" @click="selectArea">
|
|
||||||
<view v-if="!formData.cityName" class="text-[#888] text-[28rpx] flex-1">
|
|
||||||
{{ t('cityPlaceholder') }}</view>
|
|
||||||
<view v-else class="text-[28rpx] flex-1 leading-[1.4]">{{ formData.cityName }}</view>
|
|
||||||
</view>
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('address')" prop="address" borderBottom>
|
<u-form-item :label="t('address')" prop="address" borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model="formData.address" :placeholder="t('addressPlaceholder')"
|
<u-input fontSize="28rpx" v-model="formData.address" :placeholder="t('addressPlaceholder')"
|
||||||
border="none"></u-input>
|
></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('description')" prop="description" borderBottom>
|
<u-form-item :label="t('description')" prop="description" borderBottom>
|
||||||
<u-textarea fontSize="28rpx" v-model="formData.description" :placeholder="t('descriptionPlaceholder')"
|
<u-textarea fontSize="28rpx" v-model="formData.description" :placeholder="t('descriptionPlaceholder')"
|
||||||
border="none"></u-textarea>
|
></u-textarea>
|
||||||
|
</u-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<u-form-item :label="t('credentialImage')" prop="credential_image" borderBottom>
|
||||||
|
<up-upload
|
||||||
|
:fileList="credentialImageFileList"
|
||||||
|
@afterRead="afterRead"
|
||||||
|
@delete="imageDelete"
|
||||||
|
multiple
|
||||||
|
:maxCount="5"
|
||||||
|
></up-upload>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -62,18 +85,36 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, computed } from 'vue'
|
import { ref, reactive, computed } from 'vue'
|
||||||
import { t } from '@/locale'
|
import { t } from '@/locale'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { addSupplier } from '@/addon/erp/api/base';
|
import { addSupplier } from '@/addon/erp/api/base';
|
||||||
import { generatedCode } from '@/addon/erp/utils/common';
|
import { generatedCode } from '@/addon/erp/utils/common';
|
||||||
|
import { getProductTypeSelect} from '@/addon/erp/api/product';
|
||||||
|
import {uploadImage } from '@/app/api/system'
|
||||||
import { redirect } from '@/utils/common';
|
import { redirect } from '@/utils/common';
|
||||||
|
import { checkBtnPermission } from '@/utils/auth';
|
||||||
|
import useMemberStore from '@/stores/member'
|
||||||
|
import { img } from '@/utils/common'
|
||||||
|
const memberStore = useMemberStore()
|
||||||
|
interface FileItem {
|
||||||
|
url: string;
|
||||||
|
status?: string;
|
||||||
|
message?: string;
|
||||||
|
}
|
||||||
const formRef : any = ref(null)
|
const formRef : any = ref(null)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
const areaRef = ref()
|
const areaRef = ref()
|
||||||
const isSelectAddress = ref(false)
|
const isSelectAddress = ref(false)
|
||||||
|
const productTypeData=ref([])
|
||||||
|
|
||||||
const rules = computed(() => {
|
const rules = computed(() => {
|
||||||
return {
|
return {
|
||||||
|
// 'code': {
|
||||||
|
// type: 'string',
|
||||||
|
// required: true,
|
||||||
|
// message: t('codePlaceholdernew'),
|
||||||
|
// trigger: ['blur', 'change'],
|
||||||
|
// },
|
||||||
'name': {
|
'name': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
@@ -116,29 +157,109 @@
|
|||||||
city: '',
|
city: '',
|
||||||
cityName: '',
|
cityName: '',
|
||||||
address: '',
|
address: '',
|
||||||
description: ''
|
description: '',
|
||||||
|
mobile:'',
|
||||||
|
product_type_id:'',
|
||||||
|
credential_image:'',
|
||||||
})
|
})
|
||||||
|
const productTypes=ref([])
|
||||||
|
const credentialImageFileList=ref<FileItem[]>([])
|
||||||
|
|
||||||
|
// 页面加载
|
||||||
|
onLoad((option : any) => {
|
||||||
|
getProductTypeDataList();
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// const selectArea = () => {
|
||||||
|
// isSelectAddress.value = true
|
||||||
|
// areaRef.value.open()
|
||||||
|
// }
|
||||||
|
|
||||||
const selectArea = () => {
|
// const areaSelectComplete = (event : any) => {
|
||||||
isSelectAddress.value = true
|
// let cityArr = [] as any[];
|
||||||
areaRef.value.open()
|
// cityArr = [event.province.id || 0, event.city.id || 0, event.district.id || 0];
|
||||||
|
|
||||||
|
// formData.city = cityArr.join(',');
|
||||||
|
// formData.cityName = `${event.province.name || ''}${event.city.name || ''}${event.district.name || ''}`
|
||||||
|
// isSelectAddress.value = false;
|
||||||
|
// }
|
||||||
|
|
||||||
|
const productTypeChange=(e: any) =>{
|
||||||
|
console.log('e:', e,productTypes.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
const areaSelectComplete = (event : any) => {
|
const getProductTypeDataList = () => {
|
||||||
let cityArr = [] as any[];
|
getProductTypeSelect().then((res : any) => {
|
||||||
cityArr = [event.province.id || 0, event.city.id || 0, event.district.id || 0];
|
productTypeData.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
formData.city = cityArr.join(',');
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
formData.cityName = `${event.province.name || ''}${event.city.name || ''}${event.district.name || ''}`
|
if (err.code == 4001) {
|
||||||
isSelectAddress.value = false;
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const afterRead = async (event: any) => {
|
||||||
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists:FileItem[] = [].concat(event.file) ;
|
||||||
|
let fileListLen = credentialImageFileList.value.length;
|
||||||
|
lists = lists.filter((item:FileItem) => item.url);
|
||||||
|
lists.map((item: any) => {
|
||||||
|
credentialImageFileList.value.push({
|
||||||
|
url: item.url,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await uploadFilePromise(lists[i].url);
|
||||||
|
let item = credentialImageFileList.value[fileListLen];
|
||||||
|
credentialImageFileList.value.splice(fileListLen, 1, {
|
||||||
|
...item,
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: img(result as string),
|
||||||
|
});
|
||||||
|
fileListLen++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const imageDelete = (event:any) => {
|
||||||
|
if (event.index !== undefined && event.file !== undefined) {
|
||||||
|
const imageIndex = event.index;
|
||||||
|
const currentFileList = credentialImageFileList.value;
|
||||||
|
currentFileList.splice(imageIndex, 1);
|
||||||
|
credentialImageFileList.value = [...credentialImageFileList.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const uploadFilePromise = (url: any) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let a = uploadImage({
|
||||||
|
filePath:url,
|
||||||
|
name: 'file'
|
||||||
|
}).then((res:any)=>{
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(res.data.url as string);
|
||||||
|
}, 1000);
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
const handSave = () => {
|
const handSave = async() => {
|
||||||
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_base_supplier_add')
|
||||||
|
if (!hasPermission) return
|
||||||
formRef.value.validate().then(() => {
|
formRef.value.validate().then(() => {
|
||||||
if (loading.value) return
|
if (loading.value) return
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
if(credentialImageFileList.value.length > 0){
|
||||||
|
const imgUrls=credentialImageFileList.value.map((item:any)=>item.url)
|
||||||
|
formData.credential_image=imgUrls.join(',')
|
||||||
|
}
|
||||||
|
// #ifdef H5
|
||||||
|
if(productTypes.value.length > 0){
|
||||||
|
formData.product_type_id=productTypes.value.join(',')
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
addSupplier(formData).then((res : any) => {
|
addSupplier(formData).then((res : any) => {
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
redirect({ url: '/addon/erp/pages/base/supplier/list' })
|
redirect({ url: '/addon/erp/pages/base/supplier/list' })
|
||||||
|
|||||||
@@ -4,40 +4,27 @@
|
|||||||
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
||||||
<view>
|
<view>
|
||||||
<u-form-item :label="t('name')" prop="name" borderBottom required>
|
<u-form-item :label="t('name')" prop="name" borderBottom required>
|
||||||
<u-input v-model="formData.name" :placeholder="t('namePlaceholder')" border="none"></u-input>
|
<u-input v-model="formData.name" :placeholder="t('namePlaceholder')" ></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('linkman')" prop="linkman" borderBottom>
|
<u-form-item :label="t('linkman')" prop="linkman" borderBottom>
|
||||||
<u-input v-model="formData.linkman" :placeholder="t('linkmanPlaceholder')" border="none"></u-input>
|
<u-input v-model="formData.linkman" :placeholder="t('linkmanPlaceholder')" ></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('phone')" prop="phone" borderBottom>
|
<u-form-item :label="t('phone')" prop="phone" borderBottom>
|
||||||
<u-input v-model="formData.phone" :placeholder="t('phonePlaceholder')" border="none"></u-input>
|
<u-input v-model="formData.phone" :placeholder="t('phonePlaceholder')" ></u-input>
|
||||||
</u-form-item>
|
|
||||||
</view>
|
|
||||||
<view class="mt-[16rpx]">
|
|
||||||
<u-form-item :label="t('postal')" prop="postal" borderBottom>
|
|
||||||
<u-input v-model="formData.postal" :placeholder="t('postalPlaceholder')" border="none"></u-input>
|
|
||||||
</u-form-item>
|
|
||||||
</view>
|
|
||||||
<view class="mt-[16rpx]">
|
|
||||||
<u-form-item :label="t('city')" prop="cityName" borderBottom>
|
|
||||||
<view class="flex w-full items-center h-[52rpx]" @click="selectArea">
|
|
||||||
<view v-if="!formData.cityName" class="text-[#888] text-[28rpx] flex-1">{{ t('cityPlaceholder') }}</view>
|
|
||||||
<view v-else class="text-[28rpx] flex-1 leading-[1.4]">{{ formData.cityName }}</view>
|
|
||||||
</view>
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('address')" prop="address" borderBottom>
|
<u-form-item :label="t('address')" prop="address" borderBottom>
|
||||||
<u-input v-model="formData.address" :placeholder="t('addressPlaceholder')" border="none"></u-input>
|
<u-input v-model="formData.address" :placeholder="t('addressPlaceholder')" ></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<u-form-item :label="t('remark')" prop="remark" borderBottom>
|
<u-form-item :label="t('remark')" prop="remark" borderBottom>
|
||||||
<u-textarea v-model="formData.remark" :placeholder="t('remarkPlaceholder')" border="none"></u-textarea>
|
<u-textarea v-model="formData.remark" :placeholder="t('remarkPlaceholder')" ></u-textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -59,7 +46,10 @@
|
|||||||
import { addWarehouse } from '@/addon/erp/api/base';
|
import { addWarehouse } from '@/addon/erp/api/base';
|
||||||
import { generatedCode } from '@/addon/erp/utils/common';
|
import { generatedCode } from '@/addon/erp/utils/common';
|
||||||
import { redirect } from '@/utils/common';
|
import { redirect } from '@/utils/common';
|
||||||
|
import { checkBtnPermission } from '@/utils/auth';
|
||||||
|
import useMemberStore from '@/stores/member'
|
||||||
|
|
||||||
|
const memberStore = useMemberStore()
|
||||||
const formRef: any = ref(null)
|
const formRef: any = ref(null)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const areaRef = ref()
|
const areaRef = ref()
|
||||||
@@ -101,7 +91,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
const handSave = () => {
|
const handSave = async() => {
|
||||||
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_base_warehouse_add')
|
||||||
|
if (!hasPermission) return
|
||||||
formRef.value.validate().then(() => {
|
formRef.value.validate().then(() => {
|
||||||
if (loading.value) return
|
if (loading.value) return
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|||||||
@@ -12,13 +12,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('customerName')" prop="customer_id" required borderBottom>
|
<up-form-item :label="t('customerName')" prop="customer_id" required borderBottom>
|
||||||
<!-- <zxz-uni-data-select v-model="formData.customer_id" :localdata="[]" dataKey="name" dataValue="id"
|
|
||||||
:clear="false" placeholder="请选择食堂" @change="customeChange" /> -->
|
|
||||||
<!-- <uni-data-select v-model="formData.customer_id" :localdata="canteenList" placeholder="请选择食堂" @change="customeChange"></uni-data-select> -->
|
|
||||||
<!-- #ifdef H5 -->
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.customer_id" :localdata="canteenList" dataKey="name" dataValue="id"
|
||||||
|
:clear="false" placeholder="请选择食堂" @change="customeChange" />
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<!-- <wht-select v-model="formData.customer_id" :options="canteenList" dataKey="name" dataValue="id" placeholder="请选择食堂" :height="38" @change="customeChange"/> -->
|
<wht-select v-model="formData.customer_id" :options="canteenList" dataKey="name" dataValue="id" placeholder="请选择食堂" :height="38" @change="customeChange"/>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
@@ -58,13 +57,20 @@
|
|||||||
:clear="false" disabled placeholder="请选择仓库"/>
|
:clear="false" disabled placeholder="请选择仓库"/>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<wht-select v-model="formData.warehouse_id" :options="warehouseList" dataKey="name" dataValue="id" disabled placeholder="请选择仓库" backgroundColor="#f5f7fa" :height="38"/>
|
<wht-select v-model="formData.warehouse_id" :options="warehouseList" dataKey="name" dataValue="id" :defaultVal="formData.warehouse_id" disabled placeholder="请选择仓库" backgroundColor="#f5f7fa" :height="38" />
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('billingTime')" prop="billing_time" required borderBottom>
|
<up-form-item :label="t('billingTime')" prop="billing_time" required borderBottom @click="billingTimeShow = true">
|
||||||
<up-datetime-picker hasInput :show="billingTimeShow" v-model="formData.billing_time" mode="date" :placeholder="t('billingTimePlaceholder')" ></up-datetime-picker>
|
<!-- #ifdef H5 -->
|
||||||
|
<up-datetime-picker hasInput :show="billingTimeShow" v-model="formData.billing_time" mode="date" :placeholder="t('billingTimePlaceholder')" @confirm="billingTimeConfirm" @cancel="billingTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<u-input fontSize="28rpx" v-model="formData.billing_time" readonly
|
||||||
|
placeholderStyle="color: #888" :placeholder="t('billingTimePlaceholder')" />
|
||||||
|
<up-datetime-picker :show="billingTimeShow" v-model="billing_time_new" mode="date" :placeholder="t('billingTimePlaceholder')" @confirm="billingTimeConfirm" @cancel="billingTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
@@ -78,8 +84,10 @@
|
|||||||
<up-upload
|
<up-upload
|
||||||
:fileList="imageFileList"
|
:fileList="imageFileList"
|
||||||
@afterRead="afterRead"
|
@afterRead="afterRead"
|
||||||
|
@delete="imageDelete"
|
||||||
multiple
|
multiple
|
||||||
:maxCount="5"
|
:maxCount="5"
|
||||||
|
accept="image"
|
||||||
:capture="['camera']"
|
:capture="['camera']"
|
||||||
></up-upload>
|
></up-upload>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
@@ -187,6 +195,7 @@
|
|||||||
import { redirect } from '@/utils/common';
|
import { redirect } from '@/utils/common';
|
||||||
import { checkBtnPermission } from '@/utils/auth';
|
import { checkBtnPermission } from '@/utils/auth';
|
||||||
import useMemberStore from '@/stores/member'
|
import useMemberStore from '@/stores/member'
|
||||||
|
import dayjs from 'dayjs'
|
||||||
import { img } from '@/utils/common'
|
import { img } from '@/utils/common'
|
||||||
|
|
||||||
const memberStore = useMemberStore()
|
const memberStore = useMemberStore()
|
||||||
@@ -210,7 +219,6 @@
|
|||||||
// message: t('warehouseIdPlaceholder'),
|
// message: t('warehouseIdPlaceholder'),
|
||||||
// trigger: ['blur', 'change'],
|
// trigger: ['blur', 'change'],
|
||||||
// }
|
// }
|
||||||
})
|
|
||||||
})
|
})
|
||||||
const imageFileList=ref<FileItem[]>([])
|
const imageFileList=ref<FileItem[]>([])
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@@ -227,6 +235,7 @@
|
|||||||
productList: [] as any[],
|
productList: [] as any[],
|
||||||
total_num:0,
|
total_num:0,
|
||||||
total_amount:0,
|
total_amount:0,
|
||||||
|
})
|
||||||
const billing_time_new=ref(dayjs().format('YYYY-MM-DD'))
|
const billing_time_new=ref(dayjs().format('YYYY-MM-DD'))
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
@@ -258,12 +267,19 @@
|
|||||||
imageFileList.value.splice(fileListLen, 1, {
|
imageFileList.value.splice(fileListLen, 1, {
|
||||||
...item,
|
...item,
|
||||||
status: 'success',
|
status: 'success',
|
||||||
message: '',
|
message: '',
|
||||||
url:img(result as string),
|
url:img(result as string),
|
||||||
});
|
});
|
||||||
fileListLen++;
|
fileListLen++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const imageDelete = (event:any) => {
|
||||||
|
if (event.index !== undefined && event.file !== undefined) {
|
||||||
|
const imageIndex = event.index;
|
||||||
|
const currentFileList = imageFileList.value;
|
||||||
|
currentFileList.splice(imageIndex, 1);
|
||||||
|
imageFileList.value = [...imageFileList.value];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const uploadFilePromise = (url: any) => {
|
const uploadFilePromise = (url: any) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@@ -321,6 +337,7 @@
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 食堂
|
* 食堂
|
||||||
|
*/
|
||||||
const canteenList = ref<any[]>([]);
|
const canteenList = ref<any[]>([]);
|
||||||
const customeChange=(e: any) =>{
|
const customeChange=(e: any) =>{
|
||||||
formData.value.customer_id = e.id
|
formData.value.customer_id = e.id
|
||||||
@@ -366,8 +383,8 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
const handSave = () => {
|
const handSave = async() => {
|
||||||
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_add')
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_add')
|
||||||
if (!hasPermission) return
|
if (!hasPermission) return
|
||||||
if (loading.value) return
|
if (loading.value) return
|
||||||
@@ -388,7 +405,9 @@
|
|||||||
formData.value.total_num = totalData.value.total_num;
|
formData.value.total_num = totalData.value.total_num;
|
||||||
formData.value.total_amount = totalData.value.total_amount;
|
formData.value.total_amount = totalData.value.total_amount;
|
||||||
formData.value.billing_time = uni.$u.date(formData.value.billing_time, 'yyyy-mm-dd');
|
formData.value.billing_time = uni.$u.date(formData.value.billing_time, 'yyyy-mm-dd');
|
||||||
if(imageFileList.value.length > 0){
|
if(imageFileList.value.length > 0){
|
||||||
|
const imgUrls=imageFileList.value.map((item:any)=>{
|
||||||
|
return `upload${item.url.split('upload')[1]}`
|
||||||
})
|
})
|
||||||
formData.value.inbound_image=imgUrls.join(',')
|
formData.value.inbound_image=imgUrls.join(',')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,333 +1,329 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 食堂退货 -->
|
<!-- 食堂退货 -->
|
||||||
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
||||||
<up-subsection :list="statusList" mode="subsection" :current="subsectionCurrent" @change="handleChange" />
|
<up-subsection :list="statusList" mode="subsection" :current="subsectionCurrent" @change="handleChange" />
|
||||||
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" height="auto" @up="getListFn"
|
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" height="auto" @up="getListFn"
|
||||||
:top="mescrollTop">
|
:top="mescrollTop">
|
||||||
<view class="sidebar-margin body-bottom" v-if="sellReturnList.length">
|
<view class="sidebar-margin body-bottom" v-if="sellReturnList.length">
|
||||||
<view class="mb-[15rpx]" v-for="(item,index) in sellReturnList" :key="item.id">
|
<view class="mb-[15rpx]" v-for="(item,index) in sellReturnList" :key="item.id">
|
||||||
<view class="bg-[#ffffff] rounded-10rpx">
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
<view class="flex justify-between p-[20rpx]">
|
<view class="flex justify-between p-[20rpx]">
|
||||||
<view class="u-body-item-title u-line-2">{{item.code}}</view>
|
<view class="u-body-item-title u-line-2">{{item.code}}</view>
|
||||||
<view>
|
<view>
|
||||||
<up-tag v-if="item.status == 1" :text="item.status_text" type="warning" plain
|
<up-tag v-if="item.status == 1" :text="item.status_text" type="warning" plain
|
||||||
size="mini"></up-tag>
|
size="mini"></up-tag>
|
||||||
<up-tag v-if="item.status == 2" :text="item.status_text" type="error" plain
|
<up-tag v-if="item.status == 2" :text="item.status_text" type="error" plain
|
||||||
size="mini"></up-tag>
|
size="mini"></up-tag>
|
||||||
<up-tag v-if="item.status == 3" :text="item.status_text" plain size="mini"></up-tag>
|
<up-tag v-if="item.status == 3" :text="item.status_text" plain size="mini"></up-tag>
|
||||||
<up-tag v-if="item.status == 5" :text="item.status_text" type="success" plain
|
<up-tag v-if="item.status == 5" :text="item.status_text" type="success" plain
|
||||||
size="mini"></up-tag>
|
size="mini"></up-tag>
|
||||||
<up-tag v-if="item.status == 4" :text="item.status_text" type="error" plain
|
<up-tag v-if="item.status == 4" :text="item.status_text" type="error" plain
|
||||||
size="mini"></up-tag>
|
size="mini"></up-tag>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="flex justify-start flex-col p-[20rpx]">
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('customerName') }}:<text
|
{{ t('customerName') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.customer?.name}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.customer?.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
联系人:<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.contact}}</text>
|
联系人:<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.contact}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
联系电话:<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.phone}}</text>
|
联系电话:<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.phone}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
仓库名称:<text
|
仓库名称:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.warehouse?.name}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.warehouse?.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('returnQuantity') }}:<text
|
{{ t('returnQuantity') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.total_num}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.total_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('billingTime') }}:<text
|
{{ t('billingTime') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.billing_time}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.billing_time}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="operate">
|
<view class="foot border-0 border-t-1 border-solid border-[#ddd]">
|
||||||
<up-button v-if="item.status == 1" size="mini"
|
<view class="flex justify-end p-[20rpx]">
|
||||||
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}"
|
<view><up-button v-if="item.status == 1" size="mini"
|
||||||
type="primary" text="通过" @click="handleOperateOrder(item,'audit')"></up-button>
|
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}"
|
||||||
<up-button v-if="item.status == 1" size="mini"
|
type="primary" text="通过" @click="handleOperateOrder(item,'audit')"></up-button></view>
|
||||||
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}"
|
<view><up-button v-if="item.status == 1" size="mini"
|
||||||
type="error" text="拒绝" @click="handleOperateOrder(item,'notAudit')"></up-button>
|
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}"
|
||||||
<up-button v-if="item.status == 3" size="mini"
|
type="error" text="拒绝" @click="handleOperateOrder(item,'notAudit')"></up-button></view>
|
||||||
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}"
|
<view><up-button v-if="item.status == 3" size="mini"
|
||||||
type="primary" text="立即入库" @click="handleOperateOrder(item,'storage')"></up-button>
|
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}"
|
||||||
<up-button v-if="item.status == 3" size="mini"
|
type="primary" text="立即入库" @click="handleOperateOrder(item,'storage')"></up-button></view>
|
||||||
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}"
|
<view><up-button v-if="item.status == 3" size="mini"
|
||||||
type="error" text="拒绝入库" @click="handleOperateOrder(item,'notStorage')"></up-button>
|
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}"
|
||||||
<up-button v-if="item.status == 3" size="mini"
|
type="error" text="拒绝入库" @click="handleOperateOrder(item,'notStorage')"></up-button></view>
|
||||||
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}"
|
<view><up-button v-if="item.status == 3" size="mini"
|
||||||
type="error" text="撤销审核" @click="handleOperateOrder(item,'backout')"></up-button>
|
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}"
|
||||||
<up-button size="mini"
|
type="error" text="撤销审核" @click="handleOperateOrder(item,'backout')"></up-button></view>
|
||||||
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'10rpx'}"
|
<view><up-button size="mini"
|
||||||
type="success" text="详情"
|
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'10rpx'}"
|
||||||
@click="redirect({ url: '/addon/erp/pages/canteen/return/detail',param:{id: item.id} })"></up-button>
|
type="success" text="详情"
|
||||||
|
@click="redirect({ url: '/addon/erp/pages/canteen/return/detail',param:{id: item.id} })"></up-button></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<mescroll-empty v-if="!sellReturnList.length && !loading &&!listLoading"></mescroll-empty>
|
</view>
|
||||||
|
<mescroll-empty v-if="!sellReturnList.length && !loading &&!listLoading"></mescroll-empty>
|
||||||
</mescroll-body>
|
|
||||||
<loading-page :loading="loading"></loading-page>
|
</mescroll-body>
|
||||||
<!-- 通过审核模态框 -->
|
<loading-page :loading="loading"></loading-page>
|
||||||
<up-modal :show="auditOrderShow" @confirm="auditOrderConfirm" showCancelButton @cancel="auditOrderShow = false"
|
<!-- 通过审核模态框 -->
|
||||||
:title="'提示'" :content="'确定要通过审核该数据吗?'" ref="auditOrderModal"></up-modal>
|
<up-modal :show="auditOrderShow" @confirm="auditOrderConfirm" showCancelButton @cancel="auditOrderShow = false"
|
||||||
<!-- 立即入库模态框 -->
|
:title="'提示'" :content="'确定要通过审核该数据吗?'" ref="auditOrderModal"></up-modal>
|
||||||
<up-modal :show="storageOrderShow" @confirm="storageOrderConfirm" showCancelButton
|
<!-- 立即入库模态框 -->
|
||||||
@cancel="storageOrderShow = false" :title="'提示'" :content="'确定要立即入库该数据吗?'"
|
<up-modal :show="storageOrderShow" @confirm="storageOrderConfirm" showCancelButton
|
||||||
ref="storageOrderModal"></up-modal>
|
@cancel="storageOrderShow = false" :title="'提示'" :content="'确定要立即入库该数据吗?'"
|
||||||
<!-- 撤销审核模态框 -->
|
ref="storageOrderModal"></up-modal>
|
||||||
<up-modal :show="backoutOrderShow" @confirm="backoutOrderConfirm" showCancelButton
|
<!-- 撤销审核模态框 -->
|
||||||
@cancel="backoutOrderShow = false" :title="'提示'" :content="'确定要撤销审核该数据吗?'"
|
<up-modal :show="backoutOrderShow" @confirm="backoutOrderConfirm" showCancelButton
|
||||||
ref="backoutOrderModal"></up-modal>
|
@cancel="backoutOrderShow = false" :title="'提示'" :content="'确定要撤销审核该数据吗?'"
|
||||||
<!-- 拒绝审核模态框 -->
|
ref="backoutOrderModal"></up-modal>
|
||||||
<up-modal :show="notAuditOrderShow" @confirm="notAuditOrderConfirm" showCancelButton
|
<!-- 拒绝审核模态框 -->
|
||||||
@cancel="notAuditOrderShow = false" :title="'提示'" ref="notAuditOrderModal">
|
<up-modal :show="notAuditOrderShow" @confirm="notAuditOrderConfirm" showCancelButton
|
||||||
<view class="slot-content">
|
@cancel="notAuditOrderShow = false" :title="'提示'" ref="notAuditOrderModal">
|
||||||
<view>确定要拒绝通过审核该数据吗?</view>
|
<view class="slot-content">
|
||||||
<u-input fontSize="28rpx" v-model.trim="refuseReason" clearable placeholderStyle="color: #888"
|
<view>确定要拒绝通过审核该数据吗?</view>
|
||||||
placeholder="请输入拒绝原因" />
|
<u-input fontSize="28rpx" v-model.trim="refuseReason" clearable placeholderStyle="color: #888"
|
||||||
</view>
|
placeholder="请输入拒绝原因" />
|
||||||
</up-modal>
|
</view>
|
||||||
<!-- 拒绝入库模态框 -->
|
</up-modal>
|
||||||
<up-modal :show="notStorageOrderShow" @confirm="notStorageOrderConfirm" showCancelButton
|
<!-- 拒绝入库模态框 -->
|
||||||
@cancel="notStorageOrderShow = false" :title="'提示'" ref="notStorageOrderModal">
|
<up-modal :show="notStorageOrderShow" @confirm="notStorageOrderConfirm" showCancelButton
|
||||||
<view class="slot-content">
|
@cancel="notStorageOrderShow = false" :title="'提示'" ref="notStorageOrderModal">
|
||||||
<view>确定要拒绝立即入库该数据吗?</view>
|
<view class="slot-content">
|
||||||
<u-input fontSize="28rpx" v-model.trim="refuseReason" clearable placeholderStyle="color: #888"
|
<view>确定要拒绝立即入库该数据吗?</view>
|
||||||
placeholder="请输入拒绝原因" />
|
<u-input fontSize="28rpx" v-model.trim="refuseReason" clearable placeholderStyle="color: #888"
|
||||||
</view>
|
placeholder="请输入拒绝原因" />
|
||||||
</up-modal>
|
</view>
|
||||||
<view class="fixed bottom-4 right-4 z-2">
|
</up-modal>
|
||||||
<up-button @click="redirect({ url: '/addon/erp/pages/canteen/return/add'})" type="primary" shape="circle"
|
<view class="fixed bottom-4 right-4 z-2">
|
||||||
:customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
<up-button @click="redirect({ url: '/addon/erp/pages/canteen/return/add'})" type="primary" shape="circle"
|
||||||
<u-icon size="30" color="#fff" name="plus-circle-fill"></u-icon>
|
:customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
||||||
</up-button>
|
<u-icon size="30" color="#fff" name="plus-circle-fill"></u-icon>
|
||||||
</view>
|
</up-button>
|
||||||
|
</view>
|
||||||
</view>
|
|
||||||
</template>
|
</view>
|
||||||
|
</template>
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue'
|
<script setup lang="ts">
|
||||||
import { t } from '@/locale';
|
import { ref } from 'vue'
|
||||||
import { redirect, pxToRpx } from '@/utils/common';
|
import { t } from '@/locale';
|
||||||
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
import { redirect, pxToRpx } from '@/utils/common';
|
||||||
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
||||||
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
||||||
import {
|
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
||||||
getManualReturnList, updateManualReturnStatus,
|
import { getManualReturnList, updateManualReturnStatus,
|
||||||
updateManualReturnStorageStatus, antiManualReturnStatus,
|
updateManualReturnStorageStatus, antiManualReturnStatus,
|
||||||
getManualReturnStatus
|
getManualReturnStatus
|
||||||
|
} from '@/addon/erp/api/sell';
|
||||||
} from '@/addon/erp/api/sell';
|
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
||||||
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
import { checkBtnPermission } from '@/utils/auth';
|
||||||
import { checkBtnPermission } from '@/utils/auth';
|
import useMemberStore from '@/stores/member'
|
||||||
import useMemberStore from '@/stores/member'
|
|
||||||
|
interface SellReturnItem {
|
||||||
interface SellReturnItem {
|
id : number;
|
||||||
id : number;
|
}
|
||||||
}
|
const memberStore = useMemberStore()
|
||||||
const memberStore = useMemberStore()
|
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
||||||
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
const auditOrderItem = ref<SellReturnItem | null>(null);
|
||||||
const auditOrderItem = ref<SellReturnItem | null>(null);
|
const auditOrderShow = ref(false);
|
||||||
const auditOrderShow = ref(false);
|
const notAuditOrderShow = ref(false);
|
||||||
const notAuditOrderShow = ref(false);
|
const notStorageOrderShow = ref(false);
|
||||||
const notStorageOrderShow = ref(false);
|
const storageOrderShow = ref(false);
|
||||||
const storageOrderShow = ref(false);
|
const backoutOrderShow = ref(false);
|
||||||
const backoutOrderShow = ref(false);
|
const refuseReason = ref("")
|
||||||
const refuseReason = ref("")
|
const subsectionCurrent = ref(0)
|
||||||
const subsectionCurrent = ref(0)
|
const mescrollTop = "20rpx"
|
||||||
const mescrollTop = "20rpx"
|
const statusList = ref<any[]>([]);
|
||||||
const statusList = ref<any[]>([]);
|
const statusValList = ref<any[]>([]);
|
||||||
const statusValList = ref<any[]>([]);
|
const searchParams = ref<any>({
|
||||||
const searchParams = ref<any>({
|
status: 3,
|
||||||
status: 3,
|
});
|
||||||
});
|
const sellReturnList = ref<Array<any>>([]),
|
||||||
const sellReturnList = ref<Array<any>>([]),
|
loading = ref<boolean>(true),
|
||||||
loading = ref<boolean>(true),
|
listLoading = ref<boolean>(true),
|
||||||
listLoading = ref<boolean>(true),
|
mescrollRef = ref(null);
|
||||||
mescrollRef = ref(null);
|
|
||||||
|
interface mescrollStructure {
|
||||||
interface mescrollStructure {
|
num : number,
|
||||||
num : number,
|
size : number,
|
||||||
size : number,
|
endSuccess : Function,
|
||||||
endSuccess : Function,
|
[propName : string] : any
|
||||||
[propName : string] : any
|
}
|
||||||
}
|
|
||||||
|
onLoad(() => {
|
||||||
onLoad(() => {
|
// 获取状态
|
||||||
// 获取状态
|
getManualReturnStatus().then((res : any) => {
|
||||||
getManualReturnStatus().then((res : any) => {
|
statusList.value = Object.values(res.data);
|
||||||
statusList.value = Object.values(res.data);
|
statusValList.value = Object.keys(res.data);
|
||||||
statusValList.value = Object.keys(res.data);
|
subsectionCurrent.value = statusList.value.findIndex((item : any) => item === '待入库')
|
||||||
subsectionCurrent.value = statusList.value.findIndex((item : any) => item === '待入库')
|
});
|
||||||
});
|
})
|
||||||
})
|
// 分段器改变事件
|
||||||
// 分段器改变事件
|
const handleChange = (index : number) => {
|
||||||
const handleChange = (index : number) => {
|
searchParams.value.status = statusValList.value[index];
|
||||||
searchParams.value.status = statusValList.value[index];
|
getMescroll().resetUpScroll();
|
||||||
getMescroll().resetUpScroll();
|
}
|
||||||
}
|
// 操作
|
||||||
// 操作
|
const handleOperateOrder = async(item : any, type : string) => {
|
||||||
const handleOperateOrder = (item : any, type : string) => {
|
if (type === 'audit') {
|
||||||
if (type === 'audit') {
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_updateStatus')
|
||||||
const hasPermission = checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_updateStatus')
|
if (!hasPermission) return
|
||||||
if (!hasPermission) return
|
auditOrderShow.value = true
|
||||||
auditOrderShow.value = true
|
} else if (type === 'notAudit') {
|
||||||
} else if (type === 'notAudit') {
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_updateStatus')
|
||||||
const hasPermission = checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_updateStatus')
|
if (!hasPermission) return
|
||||||
if (!hasPermission) return
|
notAuditOrderShow.value = true
|
||||||
notAuditOrderShow.value = true
|
} else if (type === 'storage') {
|
||||||
} else if (type === 'storage') {
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_updateStorageStatus')
|
||||||
const hasPermission = checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_updateStorageStatus')
|
if (!hasPermission) return
|
||||||
if (!hasPermission) return
|
storageOrderShow.value = true
|
||||||
storageOrderShow.value = true
|
} else if (type === 'notStorage') {
|
||||||
} else if (type === 'notStorage') {
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_updateStorageStatus')
|
||||||
const hasPermission = checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_updateStorageStatus')
|
if (!hasPermission) return
|
||||||
if (!hasPermission) return
|
notStorageOrderShow.value = true
|
||||||
notStorageOrderShow.value = true
|
} else if (type === 'backout') {
|
||||||
} else if (type === 'backout') {
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_anti')
|
||||||
const hasPermission = checkBtnPermission(memberStore.btnPermission, 'erp_inbound_return_anti')
|
if (!hasPermission) return
|
||||||
if (!hasPermission) return
|
backoutOrderShow.value = true
|
||||||
backoutOrderShow.value = true
|
}
|
||||||
}
|
refuseReason.value = ""
|
||||||
refuseReason.value = ""
|
auditOrderItem.value = item
|
||||||
auditOrderItem.value = item
|
}
|
||||||
}
|
|
||||||
|
// 确认审核
|
||||||
// 确认审核
|
const auditOrderConfirm = () => {
|
||||||
const auditOrderConfirm = () => {
|
if (!auditOrderItem.value) {
|
||||||
if (!auditOrderItem.value) {
|
uni.showToast({
|
||||||
uni.showToast({
|
title: '数据不存在',
|
||||||
title: '数据不存在',
|
icon: 'none'
|
||||||
icon: 'none'
|
});
|
||||||
});
|
return;
|
||||||
return;
|
}
|
||||||
}
|
updateManualReturnStatus({ id: auditOrderItem.value.id, type: 'pass' })
|
||||||
updateManualReturnStatus({ id: auditOrderItem.value.id, type: 'pass' })
|
.then((res : any) => {
|
||||||
.then((res : any) => {
|
if (res.code === 1) {
|
||||||
if (res.code === 1) {
|
getMescroll().resetUpScroll();
|
||||||
getMescroll().resetUpScroll();
|
auditOrderItem.value = null;
|
||||||
auditOrderItem.value = null;
|
auditOrderShow.value = false;
|
||||||
auditOrderShow.value = false;
|
}
|
||||||
}
|
}).catch(() => { });
|
||||||
}).catch(() => { });
|
}
|
||||||
}
|
// 确认立即入库
|
||||||
// 确认立即入库
|
const storageOrderConfirm = () => {
|
||||||
const storageOrderConfirm = () => {
|
if (!auditOrderItem.value) {
|
||||||
if (!auditOrderItem.value) {
|
uni.showToast({
|
||||||
uni.showToast({
|
title: '数据不存在',
|
||||||
title: '数据不存在',
|
icon: 'none'
|
||||||
icon: 'none'
|
});
|
||||||
});
|
return;
|
||||||
return;
|
}
|
||||||
}
|
updateManualReturnStorageStatus({ id: auditOrderItem.value.id, type: 'pass' })
|
||||||
updateManualReturnStorageStatus({ id: auditOrderItem.value.id, type: 'pass' })
|
.then((res : any) => {
|
||||||
.then((res : any) => {
|
if (res.code === 1) {
|
||||||
if (res.code === 1) {
|
getMescroll().resetUpScroll();
|
||||||
getMescroll().resetUpScroll();
|
auditOrderItem.value = null;
|
||||||
auditOrderItem.value = null;
|
storageOrderShow.value = false;
|
||||||
storageOrderShow.value = false;
|
}
|
||||||
}
|
}).catch(() => { });
|
||||||
}).catch(() => { });
|
}
|
||||||
}
|
// 确认撤销审核
|
||||||
// 确认撤销审核
|
const backoutOrderConfirm = () => {
|
||||||
const backoutOrderConfirm = () => {
|
if (!auditOrderItem.value) {
|
||||||
if (!auditOrderItem.value) {
|
uni.showToast({
|
||||||
uni.showToast({
|
title: '数据不存在',
|
||||||
title: '数据不存在',
|
icon: 'none'
|
||||||
icon: 'none'
|
});
|
||||||
});
|
return;
|
||||||
return;
|
}
|
||||||
}
|
antiManualReturnStatus(auditOrderItem.value.id)
|
||||||
antiManualReturnStatus(auditOrderItem.value.id)
|
.then((res : any) => {
|
||||||
.then((res : any) => {
|
if (res.code === 1) {
|
||||||
if (res.code === 1) {
|
getMescroll().resetUpScroll();
|
||||||
getMescroll().resetUpScroll();
|
auditOrderItem.value = null;
|
||||||
auditOrderItem.value = null;
|
backoutOrderShow.value = false;
|
||||||
backoutOrderShow.value = false;
|
}
|
||||||
}
|
}).catch(() => { });
|
||||||
}).catch(() => { });
|
}
|
||||||
}
|
// 确认拒绝入库
|
||||||
// 确认拒绝入库
|
const notStorageOrderConfirm = () => {
|
||||||
const notStorageOrderConfirm = () => {
|
if (!auditOrderItem.value) {
|
||||||
if (!auditOrderItem.value) {
|
uni.showToast({
|
||||||
uni.showToast({
|
title: '数据不存在',
|
||||||
title: '数据不存在',
|
icon: 'none'
|
||||||
icon: 'none'
|
});
|
||||||
});
|
return;
|
||||||
return;
|
}
|
||||||
}
|
updateManualReturnStorageStatus({ id: auditOrderItem.value.id, type: 'reject', why: refuseReason.value })
|
||||||
updateManualReturnStorageStatus({ id: auditOrderItem.value.id, type: 'reject', why: refuseReason.value })
|
.then((res : any) => {
|
||||||
.then((res : any) => {
|
if (res.code === 1) {
|
||||||
if (res.code === 1) {
|
getMescroll().resetUpScroll();
|
||||||
getMescroll().resetUpScroll();
|
auditOrderItem.value = null;
|
||||||
auditOrderItem.value = null;
|
notStorageOrderShow.value = false;
|
||||||
notStorageOrderShow.value = false;
|
}
|
||||||
}
|
}).catch(() => { });
|
||||||
}).catch(() => { });
|
}
|
||||||
}
|
// 确认拒绝通过审核
|
||||||
// 确认拒绝通过审核
|
const notAuditOrderConfirm = () => {
|
||||||
const notAuditOrderConfirm = () => {
|
if (!auditOrderItem.value) {
|
||||||
if (!auditOrderItem.value) {
|
uni.showToast({
|
||||||
uni.showToast({
|
title: '数据不存在',
|
||||||
title: '数据不存在',
|
icon: 'none'
|
||||||
icon: 'none'
|
});
|
||||||
});
|
return;
|
||||||
return;
|
}
|
||||||
}
|
updateManualReturnStatus({ id: auditOrderItem.value.id, type: 'reject', reject_reason: refuseReason.value })
|
||||||
updateManualReturnStatus({ id: auditOrderItem.value.id, type: 'reject', reject_reason: refuseReason.value })
|
.then((res : any) => {
|
||||||
.then((res : any) => {
|
if (res.code === 1) {
|
||||||
if (res.code === 1) {
|
getMescroll().resetUpScroll();
|
||||||
getMescroll().resetUpScroll();
|
auditOrderItem.value = null;
|
||||||
auditOrderItem.value = null;
|
notAuditOrderShow.value = false;
|
||||||
notAuditOrderShow.value = false;
|
}
|
||||||
}
|
}).catch(() => { });
|
||||||
}).catch(() => { });
|
}
|
||||||
}
|
|
||||||
|
const getListFn = (mescroll : mescrollStructure) => {
|
||||||
const getListFn = (mescroll : mescrollStructure) => {
|
listLoading.value = true;
|
||||||
listLoading.value = true;
|
let data : Object = {
|
||||||
let data : Object = {
|
page: mescroll.num,
|
||||||
page: mescroll.num,
|
limit: mescroll.size,
|
||||||
limit: mescroll.size,
|
status: searchParams.value.status
|
||||||
status: searchParams.value.status
|
};
|
||||||
};
|
getManualReturnList(data).then((res : any) => {
|
||||||
getManualReturnList(data).then((res : any) => {
|
let newArr = res.data.data;
|
||||||
let newArr = res.data.data;
|
mescroll.endSuccess(newArr.length);
|
||||||
mescroll.endSuccess(newArr.length);
|
//设置列表数据
|
||||||
//设置列表数据
|
if (mescroll.num == 1) {
|
||||||
if (mescroll.num == 1) {
|
sellReturnList.value = []; //如果是第一页需手动制空列表
|
||||||
sellReturnList.value = []; //如果是第一页需手动制空列表
|
}
|
||||||
}
|
sellReturnList.value = sellReturnList.value.concat(newArr);
|
||||||
sellReturnList.value = sellReturnList.value.concat(newArr);
|
listLoading.value = false;
|
||||||
listLoading.value = false;
|
loading.value = false;
|
||||||
loading.value = false;
|
}).catch((err) => {
|
||||||
}).catch((err) => {
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
if (err.code == 4001) {
|
||||||
if (err.code == 4001) {
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
redirect({ url: '/addon/erp/pages/member/bind' })
|
}
|
||||||
}
|
listLoading.value = false;
|
||||||
listLoading.value = false;
|
loading.value = false;
|
||||||
loading.value = false;
|
mescroll.endErr(); // 请求失败, 结束加载
|
||||||
mescroll.endErr(); // 请求失败, 结束加载
|
})
|
||||||
})
|
}
|
||||||
}
|
</script>
|
||||||
</script>
|
|
||||||
|
<style scoped>
|
||||||
<style scoped>
|
|
||||||
.operate {
|
|
||||||
display: flex;
|
|
||||||
justify-self: end;
|
|
||||||
</style>
|
</style>
|
||||||
@@ -5,68 +5,88 @@
|
|||||||
labelWidth="180rpx">
|
labelWidth="180rpx">
|
||||||
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
||||||
<view>
|
<view>
|
||||||
|
<up-form-item :label="t('code')" prop="code" required borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.code" disabled clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="t('codePlaceholderNew')" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('supplierId')" prop="supplier_id" required borderBottom>
|
<up-form-item :label="t('supplierId')" prop="supplier_id" required borderBottom>
|
||||||
<view class="flex w-full items-center h-[52rpx]" @click="supplierSheetShow = true">
|
<!-- #ifdef H5 -->
|
||||||
<view v-if="!formData.supplier_id" class="text-[#888] text-[28rpx] flex-1">
|
<zxz-uni-data-select v-model="formData.supplier_id" :localdata="supplierList" dataKey="name" dataValue="id"
|
||||||
{{ t('supplierIdPlaceholder') }}
|
:clear="false" placeholder="请选择供应商" @change="supplierIdChange"/>
|
||||||
</view>
|
<!-- #endif -->
|
||||||
<view v-else class="text-[28rpx] flex-1 leading-[1.4]">{{ formData.supplier_name }}</view>
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
</view>
|
<wht-select v-model="formData.supplier_id" :options="supplierList" dataKey="name" dataValue="id" placeholder="请选择供应商" :height="38" @change="supplierIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('warehouseId')" prop="warehouse_id" required borderBottom>
|
<up-form-item :label="t('warehouseId')" prop="warehouse_id" required borderBottom>
|
||||||
<view class="flex w-full items-center h-[52rpx]" @click="warehouseSheetShow = true">
|
<!-- #ifdef H5 -->
|
||||||
<view v-if="!formData.warehouse_id" class="text-[#888] text-[28rpx] flex-1">
|
<zxz-uni-data-select v-model="formData.warehouse_id" :localdata="warehouseList" dataKey="name" dataValue="id"
|
||||||
{{ t('warehouseIdPlaceholder') }}
|
:clear="false" placeholder="请选择仓库" @change="warehouseIdChange"/>
|
||||||
</view>
|
<!-- #endif -->
|
||||||
<view v-else class="text-[28rpx] flex-1 leading-[1.4]">{{ formData.warehouse_name }}</view>
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
</view>
|
<wht-select v-model="formData.warehouse_id" :options="warehouseList" dataKey="name" dataValue="id" placeholder="请选择仓库" :height="38" @change="warehouseIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('type')" prop="type" borderBottom>
|
<up-form-item :label="t('type')" prop="type" borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model.trim="formData.type" border="none" clearable
|
<!-- #ifdef H5 -->
|
||||||
placeholderStyle="color: #888" :placeholder="t('typePlaceholder')" />
|
<zxz-uni-data-select v-model="formData.type" :localdata="typeList" dataKey="name" dataValue="name"
|
||||||
|
:clear="false" placeholder="请选择交货方式" @change="updateType"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.type" :options="typeList" dataKey="name" dataValue="name" :defaultVal="formData.type" placeholder="请选择交货方式" :height="38" @change="updateType"/>
|
||||||
|
<!-- #endif -->
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('deliveryTime')" prop="delivery_time" borderBottom>
|
<up-form-item :label="'到货日期'" prop="delivery_time" borderBottom @click="deliveryTimeShow = true">
|
||||||
<view class="flex w-full items-center h-[52rpx]" @click="deliveryTimeShow = true">
|
<up-datetime-picker hasInput :show="deliveryTimeShow" v-model="formData.delivery_time" mode="date" :placeholder="t('deliveryTimePlaceholder')" format="YYYY-MM-DD" @confirm="deliveryTimeConfirm"></up-datetime-picker>
|
||||||
<view v-if="!formData.delivery_time" class="text-[#888] text-[28rpx] flex-1">
|
|
||||||
{{ t('deliveryTimePlaceholder') }}
|
|
||||||
</view>
|
|
||||||
<view v-else class="text-[28rpx] flex-1 leading-[1.4]">{{ formData.delivery_time }}</view>
|
|
||||||
</view>
|
|
||||||
<u-datetime-picker @cancel="deliveryTimeShow = false" @confirm="deliveryTimeConfirm"
|
|
||||||
:show="deliveryTimeShow" v-model="formData.delivery_time"
|
|
||||||
:placeholder="t('deliveryTimePlaceholder')" mode="date"></u-datetime-picker>
|
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('billingTime')" prop="billing_time" borderBottom>
|
<up-form-item :label="t('billingTime')" prop="billing_time" borderBottom @click="billingTimeShow = true">
|
||||||
<view class="flex w-full items-center h-[52rpx]" @click="billingTimeShow = true">
|
<up-datetime-picker hasInput :show="billingTimeShow" v-model="formData.billing_time" mode="date" :placeholder="t('billingTimePlaceholder')" format="YYYY-MM-DD" @confirm="billingTimeConfirm"></up-datetime-picker>
|
||||||
<view v-if="!formData.billing_time" class="text-[#888] text-[28rpx] flex-1">
|
|
||||||
{{ t('billingTimePlaceholder') }}
|
|
||||||
</view>
|
|
||||||
<view v-else class="text-[28rpx] flex-1 leading-[1.4]">{{ formData.billing_time }}</view>
|
|
||||||
</view>
|
|
||||||
<u-datetime-picker @cancel="billingTimeShow = false" @confirm="billingTimeConfirm"
|
|
||||||
:show="billingTimeShow" v-model="formData.billing_time"
|
|
||||||
:placeholder="t('billingTimePlaceholder')" mode="date"></u-datetime-picker>
|
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('rate')" prop="rate" borderBottom>
|
<up-form-item :label="t('batchNumber')" prop="batch_number" required borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model.trim="formData.rate" border="none" clearable
|
<u-input fontSize="28rpx" v-model.trim="formData.batch_number" clearable
|
||||||
placeholderStyle="color: #888" :placeholder="t('ratePlaceholder')" />
|
placeholderStyle="color: #888" :placeholder="t('batchNumberPlaceholder')" />
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('remark')" prop="remark">
|
<up-form-item :label="t('remark')" prop="remark">
|
||||||
<u-textarea fontSize="28rpx" v-model="formData.remark" :placeholder="t('remarkPlaceholder')"
|
<u-textarea fontSize="28rpx" v-model="formData.remark" :placeholder="t('remarkPlaceholder')"
|
||||||
border="none"></u-textarea>
|
></u-textarea>
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('inboundImage')" prop="inbound_image">
|
||||||
|
<up-upload
|
||||||
|
:fileList="inbinboundImageFileList"
|
||||||
|
@afterRead="afterRead"
|
||||||
|
multiple
|
||||||
|
:maxCount="5"
|
||||||
|
accept="image"
|
||||||
|
></up-upload>
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('inspectionReportImage')" prop="inspection_report_image">
|
||||||
|
<up-upload
|
||||||
|
:fileList="inspectionReportImageFileList"
|
||||||
|
@afterRead="inspectionReportImageAfterRead"
|
||||||
|
multiple
|
||||||
|
:maxCount="5"
|
||||||
|
accept="image"
|
||||||
|
:capture="['camera']"
|
||||||
|
></up-upload>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -119,18 +139,27 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
<view class="content-center">
|
||||||
|
有效期(天):
|
||||||
|
</view>
|
||||||
|
<view class="ml-[20rpx]">
|
||||||
|
<u-number-box min="0" v-model="item.expiry_term" :integer="true"
|
||||||
|
inputWidth="80"></u-number-box>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
<view class="content-center">
|
<view class="content-center">
|
||||||
{{ t('purchaseQuantity') }}:
|
{{ t('purchaseQuantity') }}:
|
||||||
</view>
|
</view>
|
||||||
<view class="ml-[20rpx]">
|
<view class="ml-[20rpx]">
|
||||||
<u-number-box min="1" v-model="item.purchase_quantity" :integer="true"
|
<u-number-box min="1" v-model="item.inbound_quantity" :integer="true"
|
||||||
inputWidth="80"></u-number-box>
|
inputWidth="80"></u-number-box>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('totalPrice') }}:<text
|
{{ t('totalPrice') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{ item.purchase_quantity * item.purchase_price }}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{ item.inbound_quantity * item.purchase_price }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -139,23 +168,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
<text class="text-sm text-color-[#848484]">暂未选择产品</text>
|
<text class="text-sm text-color-[#848484]">暂未选择食材</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</up-form>
|
</up-form>
|
||||||
<!-- 产品分类 -->
|
|
||||||
<u-action-sheet class="" :actions="supplierList" :show="supplierSheetShow" :closeOnClickOverlay="true"
|
|
||||||
:safeAreaInsetBottom="true" @close="supplierSheetShow = false" @select="updateSex"></u-action-sheet>
|
|
||||||
|
|
||||||
<!-- 产品单位 -->
|
|
||||||
<u-action-sheet class="" :actions="warehouseList" :show="warehouseSheetShow" :closeOnClickOverlay="true"
|
|
||||||
:safeAreaInsetBottom="true" @close="warehouseSheetShow = false"
|
|
||||||
@select="updateSexWarehouse"></u-action-sheet>
|
|
||||||
|
|
||||||
|
|
||||||
<view class="w-full footer">
|
<view class="w-full footer">
|
||||||
<view
|
<view
|
||||||
class="py-[var(--top-m)] px-[var(--sidebar-m)] footer w-full fixed bottom-0 left-0 right-0 box-border">
|
class="py-[var(--top-m)] px-[var(--sidebar-m)] footer w-full fixed bottom-0 left-0 right-0 box-border">
|
||||||
@@ -173,14 +192,19 @@
|
|||||||
import { t } from '@/locale'
|
import { t } from '@/locale'
|
||||||
import { onLoad, onReady } from '@dcloudio/uni-app';
|
import { onLoad, onReady } from '@dcloudio/uni-app';
|
||||||
import { getSupplierSelect, getWarehouseSelect } from '@/addon/erp/api/base';
|
import { getSupplierSelect, getWarehouseSelect } from '@/addon/erp/api/base';
|
||||||
import { addOrder } from '@/addon/erp/api/purchase';
|
import { addManual } from '@/addon/erp/api/purchase';
|
||||||
import { generatedCode } from '@/addon/erp/utils/common';
|
import { generatedCode } from '@/addon/erp/utils/common';
|
||||||
|
import {uploadImage } from '@/app/api/system'
|
||||||
import { redirect } from '@/utils/common';
|
import { redirect } from '@/utils/common';
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
|
interface FileItem {
|
||||||
|
url: string;
|
||||||
|
status?: string;
|
||||||
|
message?: string;
|
||||||
|
}
|
||||||
const formRef : any = ref(null)
|
const formRef : any = ref(null)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
|
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
// 'supplier_id': {
|
// 'supplier_id': {
|
||||||
@@ -198,22 +222,36 @@
|
|||||||
|
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: "",
|
id: "",
|
||||||
code: generatedCode("CG"),
|
code: generatedCode("RK"),
|
||||||
supplier_id: "",
|
supplier_id: "",
|
||||||
supplier_name: "",
|
supplier_name: "",
|
||||||
delivery_time: dayjs().format('YYYY-MM-DD'),
|
delivery_time: dayjs().format('YYYY-MM-DD'),
|
||||||
type: "",
|
type: "送货上门",
|
||||||
warehouse_id: "",
|
warehouse_id: "",
|
||||||
warehouse_name: "",
|
warehouse_name: "",
|
||||||
billing_time: dayjs().format('YYYY-MM-DD'),
|
billing_time: dayjs().format('YYYY-MM-DD'),
|
||||||
remark: "",
|
remark: "",
|
||||||
rate: 16,
|
|
||||||
product: [] as any[],
|
product: [] as any[],
|
||||||
total_num: 0,
|
batch_number: generatedCode('BN'),
|
||||||
money: 0,
|
inbound_image:"",
|
||||||
total_money: 0
|
inspection_report_image:"",
|
||||||
|
total_num:0,
|
||||||
|
total_amount:0,
|
||||||
})
|
})
|
||||||
|
const typeList = ref([
|
||||||
|
{
|
||||||
|
name: '送货上门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '到店自提'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '邮寄配送'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const inbinboundImageFileList=ref<FileItem[]>([])
|
||||||
|
const inspectionReportImageFileList=ref<FileItem[]>([])
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
formRef.value.setRules(rules);
|
formRef.value.setRules(rules);
|
||||||
})
|
})
|
||||||
@@ -232,28 +270,93 @@
|
|||||||
uniqueItems[item.code] = item;
|
uniqueItems[item.code] = item;
|
||||||
});
|
});
|
||||||
|
|
||||||
res.forEach(item => {
|
res.forEach((item:any) => {
|
||||||
if (!uniqueItems[item.code]) {
|
if (!uniqueItems[item.code]) {
|
||||||
uniqueItems[item.code] = item;
|
uniqueItems[item.code] = item;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const uniqueArray = Object.values(uniqueItems);
|
const uniqueArray = Object.values(uniqueItems);
|
||||||
formData.value.product = uniqueArray.map(item => {
|
formData.value.product = uniqueArray.map((item:any) => {
|
||||||
item.purchase_price = 0;
|
item.purchase_price = 0;
|
||||||
item.purchase_quantity = 1;
|
item.inbound_quantity = 1;
|
||||||
|
item.expiry_term=item.expiry_term || 0
|
||||||
item.unit = item.productUnit?.name
|
item.unit = item.productUnit?.name
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const afterRead = async (event: any) => {
|
||||||
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists:FileItem[] = [].concat(event.file) ;
|
||||||
|
let fileListLen = inbinboundImageFileList.value.length;
|
||||||
|
lists = lists.filter((item:FileItem) => item.url);
|
||||||
|
lists.map((item: any) => {
|
||||||
|
inbinboundImageFileList.value.push({
|
||||||
|
url: item.url,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await uploadFilePromise(lists[i].url);
|
||||||
|
let item = inbinboundImageFileList.value[fileListLen];
|
||||||
|
inbinboundImageFileList.value.splice(fileListLen, 1, {
|
||||||
|
...item,
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: result as string,
|
||||||
|
});
|
||||||
|
fileListLen++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const inspectionReportImageAfterRead = async (event: any) => {
|
||||||
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists:FileItem[] = [].concat(event.file) ;
|
||||||
|
let fileListLen = inspectionReportImageFileList.value.length;
|
||||||
|
lists = lists.filter((item:FileItem) => item.url);
|
||||||
|
lists.map((item: any) => {
|
||||||
|
inspectionReportImageFileList.value.push({
|
||||||
|
url: item.url,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await uploadFilePromise(lists[i].url);
|
||||||
|
let item = inspectionReportImageFileList.value[fileListLen];
|
||||||
|
inspectionReportImageFileList.value.splice(fileListLen, 1, {
|
||||||
|
...item,
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: result as string,
|
||||||
|
});
|
||||||
|
fileListLen++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const uploadFilePromise = (url: any) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let a = uploadImage({
|
||||||
|
filePath:url,
|
||||||
|
name: 'file'
|
||||||
|
}).then((res:any)=>{
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(res.data.url as string);
|
||||||
|
}, 1000);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateType = (e : any) => {
|
||||||
|
formData.value.type = e.name;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 供应商
|
* 供应商
|
||||||
*/
|
*/
|
||||||
const supplierSheetShow = ref(false)
|
|
||||||
const supplierList = ref<any[]>([]);
|
const supplierList = ref<any[]>([]);
|
||||||
const updateSex = (e : any) => {
|
const supplierIdChange = (e : any) => {
|
||||||
formData.value.supplier_id = e.id;
|
formData.value.supplier_id = e.id;
|
||||||
formData.value.supplier_name = e.name;
|
formData.value.supplier_name = e.name;
|
||||||
if (formRef.value) {
|
if (formRef.value) {
|
||||||
@@ -275,9 +378,8 @@
|
|||||||
/**
|
/**
|
||||||
* 仓库
|
* 仓库
|
||||||
*/
|
*/
|
||||||
const warehouseSheetShow = ref(false)
|
|
||||||
const warehouseList = ref<any[]>([]);
|
const warehouseList = ref<any[]>([]);
|
||||||
const updateSexWarehouse = (e : any) => {
|
const warehouseIdChange = (e : any) => {
|
||||||
formData.value.warehouse_id = e.id;
|
formData.value.warehouse_id = e.id;
|
||||||
formData.value.warehouse_name = e.name;
|
formData.value.warehouse_name = e.name;
|
||||||
if (formRef.value) {
|
if (formRef.value) {
|
||||||
@@ -296,7 +398,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转到产品选择页
|
// 跳转到食材选择页
|
||||||
const goProductSelect = () => {
|
const goProductSelect = () => {
|
||||||
if (!formData.value.warehouse_id) {
|
if (!formData.value.warehouse_id) {
|
||||||
uni.showToast({ icon: 'none', title: t('warehouseIdPlaceholder') })
|
uni.showToast({ icon: 'none', title: t('warehouseIdPlaceholder') })
|
||||||
@@ -338,23 +440,23 @@
|
|||||||
const totalData = computed(() => {
|
const totalData = computed(() => {
|
||||||
let data = {
|
let data = {
|
||||||
money: 0,
|
money: 0,
|
||||||
total_money: 0,
|
|
||||||
nums: 0,
|
nums: 0,
|
||||||
};
|
};
|
||||||
for (let item of formData.value.product) {
|
for (let item of formData.value.product) {
|
||||||
let amount = Number(item.purchase_quantity) * Number(item.purchase_price);
|
let amount = Number(item.inbound_quantity) * Number(item.purchase_price);
|
||||||
data.money += amount;
|
data.money += amount;
|
||||||
data.nums += Number(item.purchase_quantity);
|
data.nums += Number(item.inbound_quantity);
|
||||||
}
|
}
|
||||||
// 税后金额
|
|
||||||
data.total_money = data.money + data.money * (formData.value.rate / 100);
|
|
||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
const handSave = () => {
|
const handSave = () => {
|
||||||
if (loading.value) return
|
if (loading.value) return
|
||||||
|
if (!formData.value.code) {
|
||||||
|
uni.showToast({ icon: 'none', title: t('codePlaceholderNew') })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!formData.value.supplier_id) {
|
if (!formData.value.supplier_id) {
|
||||||
uni.showToast({ icon: 'none', title: t('supplierIdPlaceholder') })
|
uni.showToast({ icon: 'none', title: t('supplierIdPlaceholder') })
|
||||||
return false;
|
return false;
|
||||||
@@ -363,17 +465,28 @@
|
|||||||
uni.showToast({ icon: 'none', title: t('warehouseIdPlaceholder') })
|
uni.showToast({ icon: 'none', title: t('warehouseIdPlaceholder') })
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!formData.value.batch_number) {
|
||||||
|
uni.showToast({ icon: 'none', title: t('batchNumberPlaceholder') })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|
||||||
formData.value.total_num = totalData.value.nums;
|
formData.value.total_num = totalData.value.nums;
|
||||||
formData.value.money = totalData.value.money;
|
formData.value.total_amount = totalData.value.money;
|
||||||
formData.value.total_money = totalData.value.total_money;
|
formData.value.delivery_time = uni.$u.date(formData.value.delivery_time, 'yyyy-mm-dd');
|
||||||
|
formData.value.billing_time = uni.$u.date(formData.value.billing_time, 'yyyy-mm-dd');
|
||||||
addOrder(formData.value).then((res : any) => {
|
if(inbinboundImageFileList.value.length > 0){
|
||||||
|
const imgUrls=inbinboundImageFileList.value.map((item:any)=>item.url)
|
||||||
|
formData.value.inbound_image=imgUrls.join(',')
|
||||||
|
}
|
||||||
|
if(inspectionReportImageFileList.value.length > 0){
|
||||||
|
const imgUrls=inspectionReportImageFileList.value.map((item:any)=>item.url)
|
||||||
|
formData.value.inspection_report_image=imgUrls.join(',')
|
||||||
|
}
|
||||||
|
addManual(formData.value).then((res : any) => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
redirect({ url: '/addon/erp/pages/purchase/order/list' })
|
redirect({ url: '/addon/erp/pages/inbound/order/list' })
|
||||||
}
|
}
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
@@ -6,12 +6,8 @@
|
|||||||
<view class="flex justify-between p-[20rpx]">
|
<view class="flex justify-between p-[20rpx]">
|
||||||
<view class="u-body-item-title u-line-2">{{t('code')}}:{{formData.code}}</view>
|
<view class="u-body-item-title u-line-2">{{t('code')}}:{{formData.code}}</view>
|
||||||
<view>
|
<view>
|
||||||
<up-tag v-if="formData.status == 0" :text="formData.status_text" type="warning" plain
|
<up-tag v-if="formData.storage_status == 2" :text="formData.status_text" plain size="mini"></up-tag>
|
||||||
size="mini"></up-tag>
|
<up-tag v-if="formData.storage_status == 3" :text="formData.status_text" type="success" plain
|
||||||
<up-tag v-if="formData.status == 1" :text="formData.status_text" type="error" plain
|
|
||||||
size="mini"></up-tag>
|
|
||||||
<up-tag v-if="formData.status == 2" :text="formData.status_text" plain size="mini"></up-tag>
|
|
||||||
<up-tag v-if="formData.status == 3" :text="formData.status_text" type="success" plain
|
|
||||||
size="mini"></up-tag>
|
size="mini"></up-tag>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -38,7 +34,19 @@
|
|||||||
{{ t('totalNums') }}:<text
|
{{ t('totalNums') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.total_num}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.total_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('deliveryTime') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.delivery_time}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('warehouseId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.warehouse.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('remark') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.remark}}</text>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('rate') }}:<text
|
{{ t('rate') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.rate}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.rate}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -49,6 +57,14 @@
|
|||||||
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('totalMoney') }}:<text
|
{{ t('totalMoney') }}:<text
|
||||||
class="ml-[20rpx] text-base text-red-500">¥{{formData.total_money}}</text>
|
class="ml-[20rpx] text-base text-red-500">¥{{formData.total_money}}</text>
|
||||||
|
</view> -->
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '录入人' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.enter_name }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '入库人' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.store_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('createTime') }}:<text
|
{{ t('createTime') }}:<text
|
||||||
@@ -67,22 +83,21 @@
|
|||||||
|
|
||||||
<view v-if="formData.productList.length > 0" class="sidebar-margin mt-[20rpx] pb-[20rpx] body-bottom">
|
<view v-if="formData.productList.length > 0" class="sidebar-margin mt-[20rpx] pb-[20rpx] body-bottom">
|
||||||
<view class="mb-[15rpx]" v-for="(item, index) in formData.productList" :key="index">
|
<view class="mb-[15rpx]" v-for="(item, index) in formData.productList" :key="index">
|
||||||
|
|
||||||
<view class="bg-[#ffffff] rounded-10rpx">
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
<view class="flex justify-between p-[20rpx]">
|
<view class="flex justify-between p-[20rpx]">
|
||||||
<view class="u-body-item-title u-line-2">{{item.products?.name}}</view>
|
<view class="u-body-item-title u-line-2">{{item.product?.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="flex justify-start flex-col p-[20rpx]">
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productCode') }}:<text
|
{{ t('productCode') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.products?.code}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.code}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('spec') }}:<text
|
{{ t('spec') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.products?.spec}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.spec}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productUnitId') }}:<text
|
{{ t('productUnitId') }}:<text
|
||||||
@@ -90,7 +105,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('purchaseQuantity') }}:
|
{{ t('purchaseQuantity') }}:
|
||||||
<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.nums}}</text>
|
<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.num}}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
@@ -99,7 +114,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('totalPrice') }}:<text
|
{{ t('totalPrice') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{ item.nums * item.price }}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{ item.num * item.price }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -108,12 +123,45 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
<text class="text-sm text-color-[#848484]">暂未选择产品</text>
|
<text class="text-sm text-color-[#848484]">暂未选择食材</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view :class="formData.storage_status == 2 ?'pb-[120rpx]':''">
|
||||||
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
{{ t('inboundImage') }}
|
||||||
|
</view>
|
||||||
|
<view v-if="inboundImageArr.length >0">
|
||||||
|
<view class="img-p">
|
||||||
|
<up-image :show-loading="true" v-for="(imgItem,imgIndex) in inboundImageArr" :key="imgIndex" :src="img(imgItem)" style="margin: 6rpx;" width="100rpx" height="100rpx" @click="previewImageClick(img(imgItem))"></up-image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
|
<text class="text-sm text-color-[#848484]">暂未上传{{ t('inboundImage') }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
{{ t('inspectionReportImage') }}
|
||||||
|
</view>
|
||||||
|
<view class="img-p pb-[120rpx]" v-if="inspectionReportImageArr.length >0">
|
||||||
|
<up-image :show-loading="true" v-for="(inspectionReportItem,inspectionReportIndex) in inspectionReportImageArr" :key="inspectionReportIndex" :src="img(inspectionReportItem)" style="margin: 6rpx;" width="100rpx" height="100rpx" @click="previewImageClick(img(inspectionReportItem))"></up-image>
|
||||||
|
</view>
|
||||||
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
|
<text class="text-sm text-color-[#848484]">暂未上传{{ t('inspectionReportImage') }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="w-full footer" v-if="formData.storage_status == 2">
|
||||||
|
<view
|
||||||
|
class="py-[var(--top-m)] px-[var(--sidebar-m)] footer w-full fixed bottom-0 left-0 right-0 box-border">
|
||||||
|
<button hover-class="none"
|
||||||
|
class="!bg-[var(--primary-color)] text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500"
|
||||||
|
@click="handleEnteringWarehouse" >立即入库</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 立即入库模态框 -->
|
||||||
|
<up-modal :show="enteringWarehouseShow" @confirm="enteringWarehouseConfirm" showCancelButton @cancel="enteringWarehouseShow = false"
|
||||||
|
:title="'入库'" :content="'确定要入库该数据吗?'" ref="enteringWarehouseModal"></up-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -121,8 +169,8 @@
|
|||||||
import { ref, reactive, computed, onMounted } from 'vue'
|
import { ref, reactive, computed, onMounted } from 'vue'
|
||||||
import { t } from '@/locale'
|
import { t } from '@/locale'
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { getOrderInfo } from '@/addon/erp/api/purchase';
|
import { getManualInfo,putInStorage } from '@/addon/erp/api/purchase';
|
||||||
|
import { img } from '@/utils/common'
|
||||||
const formRef : any = ref(null)
|
const formRef : any = ref(null)
|
||||||
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
@@ -131,6 +179,7 @@
|
|||||||
productType: {
|
productType: {
|
||||||
name: ''
|
name: ''
|
||||||
},
|
},
|
||||||
|
id:'',
|
||||||
spec: '',
|
spec: '',
|
||||||
productUnit: {
|
productUnit: {
|
||||||
name: ''
|
name: ''
|
||||||
@@ -140,19 +189,64 @@
|
|||||||
max_warning: '',
|
max_warning: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
create_time: '',
|
create_time: '',
|
||||||
productList: []
|
delivery_time:'',
|
||||||
|
productList: [],
|
||||||
|
warehouse:{
|
||||||
|
name:''
|
||||||
|
},
|
||||||
|
inbound_image:"",
|
||||||
|
inspection_report_image:""
|
||||||
|
})
|
||||||
|
const enteringWarehouseShow = ref(false);
|
||||||
|
const inboundImageArr=computed (()=>{
|
||||||
|
if(formData.inbound_image){
|
||||||
|
return formData.inbound_image.split(',')
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
})
|
||||||
|
const inspectionReportImageArr=computed (()=>{
|
||||||
|
if(formData.inspection_report_image){
|
||||||
|
return formData.inspection_report_image.split(',')
|
||||||
|
}
|
||||||
|
return []
|
||||||
})
|
})
|
||||||
|
|
||||||
// 加载
|
// 加载
|
||||||
onLoad((data : any) => {
|
onLoad((data : any) => {
|
||||||
getInfo(data.id);
|
getInfo(data.id);
|
||||||
})
|
})
|
||||||
|
|
||||||
const getInfo = async (id : number) => {
|
const getInfo = async (id : number) => {
|
||||||
const data = await (await getOrderInfo(id)).data;
|
const data = await (await getManualInfo(id)).data;
|
||||||
Object.assign(formData, data);
|
Object.assign(formData, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 立即入库
|
||||||
|
const handleEnteringWarehouse= (item:any)=>{
|
||||||
|
enteringWarehouseShow.value=true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认立即入库
|
||||||
|
const enteringWarehouseConfirm = () => {
|
||||||
|
putInStorage(formData.id)
|
||||||
|
.then((res:any) => {
|
||||||
|
if(res.code ===1){
|
||||||
|
getInfo(formData.id);
|
||||||
|
enteringWarehouseShow.value = false;
|
||||||
|
}
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
const previewImageClick=(url:string)=>{
|
||||||
|
uni.previewImage({
|
||||||
|
current: 0,
|
||||||
|
urls:[url]
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
|
.img-p{
|
||||||
|
display: flex;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,24 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- 入库订单(已入库) -->
|
||||||
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
||||||
|
<!-- <up-subsection :list="statusList" mode="subsection" :current="subsectionCurrent" @change="handleChange" /> -->
|
||||||
<up-subsection :list="statusList" mode="subsection" :current="0" @change="handleChange" />
|
|
||||||
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" height="auto" @up="getListFn"
|
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" height="auto" @up="getListFn"
|
||||||
:top="mescrollTop">
|
:top="mescrollTop">
|
||||||
<view class="sidebar-margin body-bottom" v-if="orderList.length">
|
<view class="sidebar-margin body-bottom" v-if="orderList.length">
|
||||||
<view class="mb-[15rpx]" v-for="(item,index) in orderList" :key="item.id">
|
<view class="mb-[15rpx]" v-for="(item,index) in orderList" :key="item.id">
|
||||||
|
|
||||||
<view class="bg-[#ffffff] rounded-10rpx"
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
@click="redirect({ url: '/addon/erp/pages/purchase/order/detail',param:{id: item.id} })">
|
|
||||||
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
<view class="flex justify-between p-[20rpx]">
|
<view class="flex justify-between p-[20rpx]">
|
||||||
<view class="u-body-item-title u-line-2">{{item.code}}</view>
|
<view class="u-body-item-title u-line-2">{{item.code}}</view>
|
||||||
<view>
|
<view>
|
||||||
<up-tag v-if="item.status == 0" :text="item.status_text" type="warning" plain
|
<up-tag v-if="item.storage_status == 2" :text="item.status_text" plain size="mini"></up-tag>
|
||||||
size="mini"></up-tag>
|
<up-tag v-if="item.storage_status == 3" :text="item.status_text" type="success" plain
|
||||||
<up-tag v-if="item.status == 1" :text="item.status_text" type="error" plain
|
|
||||||
size="mini"></up-tag>
|
|
||||||
<up-tag v-if="item.status == 2" :text="item.status_text" plain size="mini"></up-tag>
|
|
||||||
<up-tag v-if="item.status == 3" :text="item.status_text" type="success" plain
|
|
||||||
size="mini"></up-tag>
|
size="mini"></up-tag>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -38,20 +33,25 @@
|
|||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.supplier?.phone}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.supplier?.phone}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('type') }}:<text
|
{{ '录入人' }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.type}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.enter_name }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('totalNums') }}:<text
|
{{ '入库人' }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.total_num}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.store_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('createTime') }}:<text
|
{{ t('createTime') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.create_time}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.create_time}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="operate">
|
||||||
|
<up-button v-if="item.storage_status == 2" size="mini" :customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx'}" type="primary" text="立即入库" @click="handleEnteringWarehouse(item)"></up-button>
|
||||||
|
<up-button size="mini" :customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'10rpx'}" type="success" :text=" t('detailGo')" @click="redirect({ url: '/addon/erp/pages/inbound/order/detail',param:{id: item.id} })"></up-button>
|
||||||
|
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -59,12 +59,15 @@
|
|||||||
|
|
||||||
</mescroll-body>
|
</mescroll-body>
|
||||||
<loading-page :loading="loading"></loading-page>
|
<loading-page :loading="loading"></loading-page>
|
||||||
<view class="fixed bottom-4 right-4 z-2">
|
<!-- 立即入库模态框 -->
|
||||||
<up-button @click="redirect({ url: '/addon/erp/pages/purchase/order/add'})" type="primary" shape="circle"
|
<up-modal :show="enteringWarehouseShow" @confirm="enteringWarehouseConfirm" showCancelButton @cancel="enteringWarehouseShow = false"
|
||||||
|
:title="'入库'" :content="'确定要入库该数据吗?'" ref="enteringWarehouseModal"></up-modal>
|
||||||
|
<!-- <view class="fixed bottom-4 right-4 z-2">
|
||||||
|
<up-button @click="redirect({ url: '/addon/erp/pages/inbound/order/add'})" type="primary" shape="circle"
|
||||||
:customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
:customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
||||||
<u-icon size="30" color="#fff" name="plus-circle-fill"></u-icon>
|
<u-icon size="30" color="#fff" name="plus-circle-fill"></u-icon>
|
||||||
</up-button>
|
</up-button>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -76,16 +79,17 @@
|
|||||||
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
||||||
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
||||||
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
||||||
import { getOrderList, getOrderStatus } from '@/addon/erp/api/purchase';
|
import { getManualList, getManualStatus,putInStorage} from '@/addon/erp/api/purchase';
|
||||||
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
||||||
|
|
||||||
|
const enteringWarehouseId=ref('')
|
||||||
const show = ref(false);
|
const subsectionCurrent=ref(0)
|
||||||
|
const enteringWarehouseShow = ref(false);
|
||||||
const statusList = ref<any[]>([]);
|
const statusList = ref<any[]>([]);
|
||||||
const searchParams = ref<any>({
|
const searchParams = ref<any>({
|
||||||
status: undefined,
|
status: 3,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取系统状态栏的高度
|
// 获取系统状态栏的高度
|
||||||
@@ -97,25 +101,37 @@
|
|||||||
|
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getStatusAllFn();
|
// 获取状态
|
||||||
})
|
getManualStatus().then((res:any) => {
|
||||||
|
statusList.value = Object.values(res.data);
|
||||||
// 获取状态
|
subsectionCurrent.value=statusList.value.findIndex((item:any)=>item === '待入库')
|
||||||
const getStatusAllFn = () => {
|
|
||||||
getOrderStatus().then((res) => {
|
|
||||||
statusList.value = res.data;
|
|
||||||
statusList.value.unshift('全部')
|
|
||||||
});
|
});
|
||||||
};
|
})
|
||||||
|
// 立即入库
|
||||||
|
const handleEnteringWarehouse= (item:any)=>{
|
||||||
|
enteringWarehouseShow.value=true
|
||||||
|
enteringWarehouseId.value=item.id
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认立即入库
|
||||||
|
const enteringWarehouseConfirm = () => {
|
||||||
|
if (enteringWarehouseId.value == '') {
|
||||||
|
uni.showToast({ icon: 'none', title: t("Invalid ID") });
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
putInStorage(enteringWarehouseId.value)
|
||||||
|
.then((res:any) => {
|
||||||
|
if(res.code ===1){
|
||||||
|
getMescroll().resetUpScroll();
|
||||||
|
enteringWarehouseId.value = '';
|
||||||
|
enteringWarehouseShow.value = false;
|
||||||
|
}
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
|
||||||
// 分段器改变事件
|
// 分段器改变事件
|
||||||
const handleChange = (index : number) => {
|
const handleChange = (index : number) => {
|
||||||
// 由于多了一个全部,这里多个处理
|
searchParams.value.status = index===0?2:3;
|
||||||
if (index === 0) {
|
|
||||||
searchParams.value.status = undefined
|
|
||||||
} else {
|
|
||||||
searchParams.value.status = index - 1;
|
|
||||||
}
|
|
||||||
getMescroll().resetUpScroll();
|
getMescroll().resetUpScroll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,9 +154,9 @@
|
|||||||
let data : Object = {
|
let data : Object = {
|
||||||
page: mescroll.num,
|
page: mescroll.num,
|
||||||
limit: mescroll.size,
|
limit: mescroll.size,
|
||||||
status: searchParams.value.status
|
storage_status: searchParams.value.status
|
||||||
};
|
};
|
||||||
getOrderList(data).then((res : any) => {
|
getManualList(data).then((res : any) => {
|
||||||
let newArr = res.data.data;
|
let newArr = res.data.data;
|
||||||
mescroll.endSuccess(newArr.length);
|
mescroll.endSuccess(newArr.length);
|
||||||
//设置列表数据
|
//设置列表数据
|
||||||
@@ -162,5 +178,10 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
|
.operate{
|
||||||
|
display: flex;
|
||||||
|
justify-self: end;
|
||||||
|
padding-bottom:20rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
565
src/addon/erp/pages/inbound/stockPending/add.vue
Normal file
565
src/addon/erp/pages/inbound/stockPending/add.vue
Normal file
@@ -0,0 +1,565 @@
|
|||||||
|
<template>
|
||||||
|
<view class="bg-[var(--page-bg-color)] min-h-[100vh] overflow-hidden form-edit" :style="themeColor()">
|
||||||
|
|
||||||
|
<up-form labelPosition="left" :model="formData" errorType='toast' :rules="rules" ref="formRef"
|
||||||
|
labelWidth="180rpx">
|
||||||
|
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
||||||
|
<view>
|
||||||
|
<up-form-item :label="t('code')" prop="code" required borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.code" disabled clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="t('codePlaceholderNew')" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('supplierId')" prop="supplier_id" required borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.supplier_id" :localdata="supplierList" dataKey="name"
|
||||||
|
dataValue="id" :clear="false" placeholder="请选择供应商" @change="supplierIdChange" />
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.supplier_id" :options="supplierList" dataKey="name" dataValue="id"
|
||||||
|
placeholder="请选择供应商" :height="38" @change="supplierIdChange" />
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('warehouseId')" prop="warehouse_id" required borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.warehouse_id" :localdata="warehouseList" dataKey="name"
|
||||||
|
dataValue="id" :clear="false" placeholder="请选择仓库" @change="warehouseIdChange" />
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.warehouse_id" :options="warehouseList" dataKey="name"
|
||||||
|
dataValue="id" placeholder="请选择仓库" :height="38" @change="warehouseIdChange" />
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('type')" prop="type" borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.type" :localdata="typeList" dataKey="name"
|
||||||
|
dataValue="name" :clear="false" placeholder="请选择交货方式" @change="updateType" />
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.type" :options="typeList" dataKey="name" dataValue="name"
|
||||||
|
placeholder="请选择交货方式" :defaultVal="formData.type" :height="38" @change="updateType" />
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'到货日期'" prop="delivery_time" borderBottom @click="deliveryTimeShow = true">
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<up-datetime-picker hasInput :show="deliveryTimeShow" v-model="formData.delivery_time"
|
||||||
|
mode="date" :placeholder="t('deliveryTimePlaceholder')" format="YYYY-MM-DD"
|
||||||
|
@confirm="deliveryTimeConfirm" @cancel="deliveryTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<u-input fontSize="28rpx" v-model="formData.delivery_time" readonly
|
||||||
|
placeholderStyle="color: #888" :placeholder="t('deliveryTimePlaceholder')" />
|
||||||
|
<up-datetime-picker :show="deliveryTimeShow" v-model="delivery_time_new" mode="date"
|
||||||
|
:placeholder="t('deliveryTimePlaceholder')" format="YYYY-MM-DD"
|
||||||
|
@confirm="deliveryTimeConfirm" @cancel="deliveryTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('billingTime')" prop="billing_time" borderBottom
|
||||||
|
@click="billingTimeShow = true">
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<up-datetime-picker hasInput :show="billingTimeShow" v-model="formData.billing_time" mode="date"
|
||||||
|
:placeholder="t('billingTimePlaceholder')" format="YYYY-MM-DD" @confirm="billingTimeConfirm"
|
||||||
|
@cancel="billingTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<u-input fontSize="28rpx" v-model="formData.billing_time" readonly
|
||||||
|
placeholderStyle="color: #888" :placeholder="t('billingTimePlaceholder')" />
|
||||||
|
<up-datetime-picker :show="billingTimeShow" v-model="billing_time_new" mode="date"
|
||||||
|
:placeholder="t('billingTimePlaceholder')" format="YYYY-MM-DD" @confirm="billingTimeConfirm"
|
||||||
|
@cancel="billingTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('batchNumber')" prop="batch_number" required borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.batch_number" clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="t('batchNumberPlaceholder')" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('remark')" prop="remark">
|
||||||
|
<u-textarea fontSize="28rpx" v-model="formData.remark"
|
||||||
|
:placeholder="t('remarkPlaceholder')"></u-textarea>
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('inboundImage')" prop="inbound_image">
|
||||||
|
<up-upload :fileList="inbinboundImageFileList" @afterRead="afterRead" @delete="imageDelete" multiple :maxCount="5"
|
||||||
|
accept="image" :capture="['camera']"></up-upload>
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('inspectionReportImage')" prop="inspection_report_image">
|
||||||
|
<up-upload :fileList="inspectionReportImageFileList" @afterRead="inspectionReportImageAfterRead" @delete="imageDelete2"
|
||||||
|
multiple :maxCount="5" accept="image" :capture="['camera']"></up-upload>
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mx-[var(--sidebar-m)] bg-[#ffffff] rounded mt-[20rpx]">
|
||||||
|
<view class="flex justify-between py-[10rpx] px-[20rpx] box-border border-0 border-b-1 border-color-[#dadbde] border-solid
|
||||||
|
">
|
||||||
|
<view class="text-base font-bold">{{t('Enter product')}}</view>
|
||||||
|
<view><u-button @click="goProductSelect" icon="plus" type="primary" :plain="true" size="mini"
|
||||||
|
:text="t('Add product')"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="formData.product.length > 0" class="sidebar-margin mt-[20rpx] pb-[20rpx] body-bottom">
|
||||||
|
<view class="mb-[15rpx]" v-for="(item, index) in formData.product" :key="index">
|
||||||
|
|
||||||
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
<view class="flex justify-between p-[20rpx]">
|
||||||
|
<view class="u-body-item-title u-line-2">{{item.name}}</view>
|
||||||
|
<view><u-button :plain="true" type="error" @click="hanldeDelete(index)"
|
||||||
|
:text="t('delete')" size="mini"></u-button></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="body">
|
||||||
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productCode') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.code}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productTypeId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.productType?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('spec') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.spec}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productUnitId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.productUnit?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
<view class="content-center">
|
||||||
|
{{ t('purchasePrice') }}:
|
||||||
|
</view>
|
||||||
|
<view class="ml-[20rpx]">
|
||||||
|
<u-number-box min="0" v-model="item.purchase_price" :integer="true"
|
||||||
|
inputWidth="80"></u-number-box>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
<view class="content-center">
|
||||||
|
有效期(天):
|
||||||
|
</view>
|
||||||
|
<view class="ml-[20rpx]">
|
||||||
|
<u-number-box min="0" v-model="item.expiry_term" :integer="true"
|
||||||
|
inputWidth="80"></u-number-box>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
<view class="content-center">
|
||||||
|
{{ t('purchaseQuantity') }}:
|
||||||
|
</view>
|
||||||
|
<view class="ml-[20rpx]">
|
||||||
|
<u-number-box min="1" v-model="item.inbound_quantity" :integer="true"
|
||||||
|
inputWidth="80"></u-number-box>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('totalPrice') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{ item.inbound_quantity * item.purchase_price }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
|
<text class="text-sm text-color-[#848484]">暂未选择食材</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</up-form>
|
||||||
|
<view class="w-full footer">
|
||||||
|
<view
|
||||||
|
class="py-[var(--top-m)] px-[var(--sidebar-m)] footer w-full fixed bottom-0 left-0 right-0 box-border">
|
||||||
|
<button hover-class="none"
|
||||||
|
class="!bg-[var(--primary-color)] text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500"
|
||||||
|
@click="handSave" :disabled="loading" :class="{'opacity-50': loading}">{{t('save')}}</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, computed } from 'vue'
|
||||||
|
import { t } from '@/locale'
|
||||||
|
import { onLoad, onReady, onShow } from '@dcloudio/uni-app';
|
||||||
|
import { getSupplierSelect, getWarehouseSelect } from '@/addon/erp/api/base';
|
||||||
|
import { addManual } from '@/addon/erp/api/purchase';
|
||||||
|
import { generatedCode } from '@/addon/erp/utils/common';
|
||||||
|
import { uploadImage } from '@/app/api/system'
|
||||||
|
import { redirect } from '@/utils/common';
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
import { checkBtnPermission} from '@/utils/auth';
|
||||||
|
import useMemberStore from '@/stores/member'
|
||||||
|
import { img } from '@/utils/common'
|
||||||
|
|
||||||
|
|
||||||
|
const memberStore = useMemberStore()
|
||||||
|
|
||||||
|
interface FileItem {
|
||||||
|
url : string;
|
||||||
|
status ?: string;
|
||||||
|
message ?: string;
|
||||||
|
}
|
||||||
|
const formRef : any = ref(null)
|
||||||
|
const loading = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
const rules = reactive({
|
||||||
|
// 'supplier_id': {
|
||||||
|
// required: true,
|
||||||
|
// message: t('supplierIdPlaceholder'),
|
||||||
|
// trigger: ['blur', 'change'],
|
||||||
|
// },
|
||||||
|
// 'warehouse_id': {
|
||||||
|
// required: true,
|
||||||
|
// message: t('warehouseIdPlaceholder'),
|
||||||
|
// trigger: ['blur', 'change'],
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const formData = ref({
|
||||||
|
id: "",
|
||||||
|
code: generatedCode("RK"),
|
||||||
|
supplier_id: "",
|
||||||
|
supplier_name: "",
|
||||||
|
delivery_time: dayjs().format('YYYY-MM-DD'),
|
||||||
|
type: "送货上门",
|
||||||
|
warehouse_id: "",
|
||||||
|
warehouse_name: "",
|
||||||
|
billing_time: dayjs().format('YYYY-MM-DD'),
|
||||||
|
remark: "",
|
||||||
|
product: [] as any[],
|
||||||
|
batch_number: generatedCode('BN'),
|
||||||
|
inbound_image: "",
|
||||||
|
inspection_report_image: "",
|
||||||
|
total_num: 0,
|
||||||
|
total_amount: 0,
|
||||||
|
})
|
||||||
|
const billing_time_new = ref(dayjs().format('YYYY-MM-DD'))
|
||||||
|
const delivery_time_new = ref(dayjs().format('YYYY-MM-DD'))
|
||||||
|
const typeList = ref([
|
||||||
|
{
|
||||||
|
name: '送货上门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '到店自提'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '邮寄配送'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const inbinboundImageFileList = ref<FileItem[]>([])
|
||||||
|
const inspectionReportImageFileList = ref<FileItem[]>([])
|
||||||
|
|
||||||
|
onReady(() => {
|
||||||
|
formRef.value.setRules(rules);
|
||||||
|
})
|
||||||
|
// 页面加载
|
||||||
|
onLoad((option : any) => {
|
||||||
|
|
||||||
|
|
||||||
|
getSupplierList();
|
||||||
|
getWarehouseList();
|
||||||
|
|
||||||
|
// 接收子页面传值
|
||||||
|
uni.$on('choose_product', res => {
|
||||||
|
const uniqueItems : any = {};
|
||||||
|
formData.value.product.forEach(item => {
|
||||||
|
uniqueItems[item.code] = item;
|
||||||
|
});
|
||||||
|
|
||||||
|
res.forEach((item : any) => {
|
||||||
|
if (!uniqueItems[item.code]) {
|
||||||
|
uniqueItems[item.code] = item;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const uniqueArray = Object.values(uniqueItems);
|
||||||
|
formData.value.product = uniqueArray.map((item : any) => {
|
||||||
|
item.purchase_price = 0;
|
||||||
|
item.inbound_quantity = 1;
|
||||||
|
item.expiry_term = item.expiry_term || 0
|
||||||
|
item.unit = item.productUnit?.name
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
})
|
||||||
|
const afterRead = async (event : any) => {
|
||||||
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists : FileItem[] = [].concat(event.file);
|
||||||
|
let fileListLen = inbinboundImageFileList.value.length;
|
||||||
|
lists = lists.filter((item : FileItem) => item.url);
|
||||||
|
lists.map((item : any) => {
|
||||||
|
inbinboundImageFileList.value.push({
|
||||||
|
url: item.url,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await uploadFilePromise(lists[i].url);
|
||||||
|
let item = inbinboundImageFileList.value[fileListLen];
|
||||||
|
inbinboundImageFileList.value.splice(fileListLen, 1, {
|
||||||
|
...item,
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: img(result as string),
|
||||||
|
});
|
||||||
|
fileListLen++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const imageDelete = (event:any) => {
|
||||||
|
if (event.index !== undefined && event.file !== undefined) {
|
||||||
|
const imageIndex = event.index;
|
||||||
|
const currentFileList = inbinboundImageFileList.value;
|
||||||
|
currentFileList.splice(imageIndex, 1);
|
||||||
|
inbinboundImageFileList.value = [...inbinboundImageFileList.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const inspectionReportImageAfterRead = async (event : any) => {
|
||||||
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists : FileItem[] = [].concat(event.file);
|
||||||
|
let fileListLen = inspectionReportImageFileList.value.length;
|
||||||
|
lists = lists.filter((item : FileItem) => item.url);
|
||||||
|
lists.map((item : any) => {
|
||||||
|
inspectionReportImageFileList.value.push({
|
||||||
|
url: item.url,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await uploadFilePromise(lists[i].url);
|
||||||
|
let item = inspectionReportImageFileList.value[fileListLen];
|
||||||
|
inspectionReportImageFileList.value.splice(fileListLen, 1, {
|
||||||
|
...item,
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url:img(result as string),
|
||||||
|
});
|
||||||
|
fileListLen++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const imageDelete2 = (event:any) => {
|
||||||
|
if (event.index !== undefined && event.file !== undefined) {
|
||||||
|
const imageIndex = event.index;
|
||||||
|
const currentFileList = inspectionReportImageFileList.value;
|
||||||
|
currentFileList.splice(imageIndex, 1);
|
||||||
|
inspectionReportImageFileList.value = [...inspectionReportImageFileList.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const uploadFilePromise = (url : any) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let a = uploadImage({
|
||||||
|
filePath: url,
|
||||||
|
name: 'file'
|
||||||
|
}).then((res : any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(res.data.url as string);
|
||||||
|
}, 1000);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateType = (e : any) => {
|
||||||
|
formData.value.type = e.name;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 供应商
|
||||||
|
*/
|
||||||
|
const supplierList = ref<any[]>([]);
|
||||||
|
const supplierIdChange = (e : any) => {
|
||||||
|
formData.value.supplier_id = e.id;
|
||||||
|
formData.value.supplier_name = e.name;
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validateField('supplier_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取供应商
|
||||||
|
const getSupplierList = () => {
|
||||||
|
getSupplierSelect({}).then((res : any) => {
|
||||||
|
supplierList.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库
|
||||||
|
*/
|
||||||
|
const warehouseList = ref<any[]>([]);
|
||||||
|
const warehouseIdChange = (e : any) => {
|
||||||
|
formData.value.warehouse_id = e.id;
|
||||||
|
formData.value.warehouse_name = e.name;
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validateField('warehouse_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取仓库
|
||||||
|
const getWarehouseList = () => {
|
||||||
|
getWarehouseSelect({}).then((res : any) => {
|
||||||
|
warehouseList.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转到食材选择页
|
||||||
|
const goProductSelect = () => {
|
||||||
|
if (!formData.value.warehouse_id) {
|
||||||
|
uni.showToast({ icon: 'none', title: t('warehouseIdPlaceholder') })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect({
|
||||||
|
url: '/addon/erp/pages/product/product/product-select',
|
||||||
|
param: {
|
||||||
|
type: 'all'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交货日期
|
||||||
|
*/
|
||||||
|
const deliveryTimeShow = ref(false);
|
||||||
|
const deliveryTimeConfirm = (e : any) => {
|
||||||
|
formData.value.delivery_time = uni.$u.date(e.value, 'yyyy-mm-dd');
|
||||||
|
deliveryTimeShow.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 制单日期
|
||||||
|
*/
|
||||||
|
const billingTimeShow = ref(false);
|
||||||
|
const billingTimeConfirm = (e : any) => {
|
||||||
|
formData.value.billing_time = uni.$u.date(e.value, 'yyyy-mm-dd');
|
||||||
|
billingTimeShow.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
const hanldeDelete = (index : number) => {
|
||||||
|
formData.value.product.splice(index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 总金额
|
||||||
|
const totalData = computed(() => {
|
||||||
|
let data = {
|
||||||
|
money: 0,
|
||||||
|
nums: 0,
|
||||||
|
};
|
||||||
|
for (let item of formData.value.product) {
|
||||||
|
let amount = Number(item.inbound_quantity) * Number(item.purchase_price);
|
||||||
|
data.money += amount;
|
||||||
|
data.nums += Number(item.inbound_quantity);
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 保存
|
||||||
|
const handSave = async() => {
|
||||||
|
const hasPermission =await checkBtnPermission(memberStore.btnPermission, 'erp_manual_inbound_add')
|
||||||
|
if (!hasPermission) return
|
||||||
|
if (loading.value) return
|
||||||
|
if (!formData.value.code) {
|
||||||
|
uni.showToast({ icon: 'none', title: t('codePlaceholderNew') })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!formData.value.supplier_id) {
|
||||||
|
uni.showToast({ icon: 'none', title: t('supplierIdPlaceholder') })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!formData.value.warehouse_id) {
|
||||||
|
uni.showToast({ icon: 'none', title: t('warehouseIdPlaceholder') })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!formData.value.batch_number) {
|
||||||
|
uni.showToast({ icon: 'none', title: t('batchNumberPlaceholder') })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
loading.value = true
|
||||||
|
formData.value.total_num = totalData.value.nums;
|
||||||
|
formData.value.total_amount = totalData.value.money;
|
||||||
|
formData.value.delivery_time = uni.$u.date(formData.value.delivery_time, 'yyyy-mm-dd');
|
||||||
|
formData.value.billing_time = uni.$u.date(formData.value.billing_time, 'yyyy-mm-dd');
|
||||||
|
if (inbinboundImageFileList.value.length > 0) {
|
||||||
|
const imgUrls = inbinboundImageFileList.value.map((item : any) => {
|
||||||
|
return `upload${item.url.split('upload')[1]}`
|
||||||
|
})
|
||||||
|
formData.value.inbound_image = imgUrls.join(',')
|
||||||
|
}
|
||||||
|
if (inspectionReportImageFileList.value.length > 0) {
|
||||||
|
const imgUrls = inspectionReportImageFileList.value.map((item : any) => {
|
||||||
|
return `upload${item.url.split('upload')[1]}`
|
||||||
|
})
|
||||||
|
formData.value.inspection_report_image = imgUrls.join(',')
|
||||||
|
}
|
||||||
|
addManual(formData.value).then((res : any) => {
|
||||||
|
loading.value = false
|
||||||
|
if (res.code == 1) {
|
||||||
|
redirect({ url: '/addon/erp/pages/inbound/stockPending/list' })
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
|
||||||
|
// console.log("formRef.value", formRef.value);
|
||||||
|
// console.log("formData.value", formData.value);
|
||||||
|
// return;
|
||||||
|
// formRef.value.validate().then(() => {
|
||||||
|
|
||||||
|
// }).catch(err => {
|
||||||
|
// console.log("err", err);
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.form-edit :deep(.up-form-item__body__left__content__label) {
|
||||||
|
font-size: 28rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-edit :deep(.up-form-item__body__right) {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
height: calc(100rpx + var(--top-m) + var(--top-m) + constant(safe-area-inset-bottom)) !important;
|
||||||
|
height: calc(100rpx + var(--top-m) + var(--top-m) + env(safe-area-inset-bottom)) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
252
src/addon/erp/pages/inbound/stockPending/detail.vue
Normal file
252
src/addon/erp/pages/inbound/stockPending/detail.vue
Normal file
@@ -0,0 +1,252 @@
|
|||||||
|
<template>
|
||||||
|
<view class="bg-[#ffffff] min-h-[100vh]" :style="themeColor()">
|
||||||
|
<view class="m-[30rpx]">
|
||||||
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
<view class="flex justify-between p-[20rpx]">
|
||||||
|
<view class="u-body-item-title u-line-2">{{t('code')}}:{{formData.code}}</view>
|
||||||
|
<view>
|
||||||
|
<up-tag v-if="formData.storage_status == 2" :text="formData.status_text" plain size="mini"></up-tag>
|
||||||
|
<up-tag v-if="formData.storage_status == 3" :text="formData.status_text" type="success" plain
|
||||||
|
size="mini"></up-tag>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="body">
|
||||||
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('supplierId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.supplier?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('contact') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.supplier?.contact}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('phone') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.supplier?.phone}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('type') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.type}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('totalNums') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.total_num}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('deliveryTime') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.delivery_time}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('warehouseId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.warehouse.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('remark') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.remark}}</text>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('rate') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.rate}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('money') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">¥{{formData.money}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('totalMoney') }}:<text
|
||||||
|
class="ml-[20rpx] text-base text-red-500">¥{{formData.total_money}}</text>
|
||||||
|
</view> -->
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '录入人' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.enter_name }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '入库人' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.store_name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('createTime') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.create_time}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="bg-[#ffffff] rounded mt-[20rpx]">
|
||||||
|
<view class="flex justify-between py-[10rpx] px-[20rpx] box-border border-0 border-b-1 border-color-[#dadbde] border-solid
|
||||||
|
">
|
||||||
|
<view class="text-base font-bold">{{t('Product List')}}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="formData.productList.length > 0" class="sidebar-margin mt-[20rpx] pb-[20rpx] body-bottom">
|
||||||
|
<view class="mb-[15rpx]" v-for="(item, index) in formData.productList" :key="index">
|
||||||
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
<view class="flex justify-between p-[20rpx]">
|
||||||
|
<view class="u-body-item-title u-line-2">{{item.product?.name}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="body">
|
||||||
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productCode') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.code}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('spec') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.spec}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productUnitId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.unit}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('purchaseQuantity') }}:
|
||||||
|
<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.num}}</text>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('purchasePrice') }}:
|
||||||
|
<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.price}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('totalPrice') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{ item.num * item.price }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
|
<text class="text-sm text-color-[#848484]">暂未选择食材</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view :class="formData.storage_status == 2 ?'pb-[120rpx]':''">
|
||||||
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
{{ t('inboundImage') }}
|
||||||
|
</view>
|
||||||
|
<view v-if="inboundImageArr.length >0">
|
||||||
|
<view class="img-p">
|
||||||
|
<up-image :show-loading="true" v-for="(imgItem,imgIndex) in inboundImageArr" :key="imgIndex" :src="img(imgItem)" style="margin: 6rpx;" width="100rpx" height="100rpx" @click="previewImageClick(img(imgItem))"></up-image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
|
<text class="text-sm text-color-[#848484]">暂未上传{{ t('inboundImage') }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
{{ t('inspectionReportImage') }}
|
||||||
|
</view>
|
||||||
|
<view class="img-p pb-[120rpx]" v-if="inspectionReportImageArr.length >0">
|
||||||
|
<up-image :show-loading="true" v-for="(inspectionReportItem,inspectionReportIndex) in inspectionReportImageArr" :key="inspectionReportIndex" :src="img(inspectionReportItem)" style="margin: 6rpx;" width="100rpx" height="100rpx" @click="previewImageClick(img(inspectionReportItem))"></up-image>
|
||||||
|
</view>
|
||||||
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
|
<text class="text-sm text-color-[#848484]">暂未上传{{ t('inspectionReportImage') }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="w-full footer" v-if="formData.storage_status == 2">
|
||||||
|
<view
|
||||||
|
class="py-[var(--top-m)] px-[var(--sidebar-m)] footer w-full fixed bottom-0 left-0 right-0 box-border">
|
||||||
|
<button hover-class="none"
|
||||||
|
class="!bg-[var(--primary-color)] text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500"
|
||||||
|
@click="handleEnteringWarehouse" >立即入库</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 立即入库模态框 -->
|
||||||
|
<up-modal :show="enteringWarehouseShow" @confirm="enteringWarehouseConfirm" showCancelButton @cancel="enteringWarehouseShow = false"
|
||||||
|
:title="'提示'" :content="'确定要入库该数据吗?'" ref="enteringWarehouseModal"></up-modal>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, computed, onMounted } from 'vue'
|
||||||
|
import { t } from '@/locale'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
import { getManualInfo,putInStorage } from '@/addon/erp/api/purchase';
|
||||||
|
import { img } from '@/utils/common'
|
||||||
|
const formRef : any = ref(null)
|
||||||
|
|
||||||
|
const formData = reactive({
|
||||||
|
code: "",
|
||||||
|
name: '',
|
||||||
|
productType: {
|
||||||
|
name: ''
|
||||||
|
},
|
||||||
|
id:'',
|
||||||
|
spec: '',
|
||||||
|
productUnit: {
|
||||||
|
name: ''
|
||||||
|
},
|
||||||
|
inventory: '',
|
||||||
|
min_warning: '',
|
||||||
|
max_warning: '',
|
||||||
|
remark: '',
|
||||||
|
create_time: '',
|
||||||
|
delivery_time:'',
|
||||||
|
productList: [],
|
||||||
|
warehouse:{
|
||||||
|
name:''
|
||||||
|
},
|
||||||
|
inbound_image:"",
|
||||||
|
inspection_report_image:""
|
||||||
|
})
|
||||||
|
const enteringWarehouseShow = ref(false);
|
||||||
|
const inboundImageArr=computed (()=>{
|
||||||
|
if(formData.inbound_image){
|
||||||
|
return formData.inbound_image.split(',')
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
})
|
||||||
|
const inspectionReportImageArr=computed (()=>{
|
||||||
|
if(formData.inspection_report_image){
|
||||||
|
return formData.inspection_report_image.split(',')
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
})
|
||||||
|
// 加载
|
||||||
|
onLoad((data : any) => {
|
||||||
|
getInfo(data.id);
|
||||||
|
})
|
||||||
|
|
||||||
|
const getInfo = async (id : number) => {
|
||||||
|
const data = await (await getManualInfo(id)).data;
|
||||||
|
Object.assign(formData, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 立即入库
|
||||||
|
const handleEnteringWarehouse= (item:any)=>{
|
||||||
|
enteringWarehouseShow.value=true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认立即入库
|
||||||
|
const enteringWarehouseConfirm = () => {
|
||||||
|
putInStorage(formData.id)
|
||||||
|
.then((res:any) => {
|
||||||
|
if(res.code ===1){
|
||||||
|
getInfo(formData.id);
|
||||||
|
enteringWarehouseShow.value = false;
|
||||||
|
}
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
const previewImageClick=(url:string)=>{
|
||||||
|
uni.previewImage({
|
||||||
|
current: 0,
|
||||||
|
urls:[url]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.img-p{
|
||||||
|
display: flex;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
436
src/addon/erp/pages/inbound/stockPending/list.vue
Normal file
436
src/addon/erp/pages/inbound/stockPending/list.vue
Normal file
@@ -0,0 +1,436 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 入库订单(待入库) -->
|
||||||
|
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
||||||
|
<!-- <up-subsection :list="statusList" mode="subsection" :current="subsectionCurrent" @change="handleChange" /> -->
|
||||||
|
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" height="auto" @up="getListFn"
|
||||||
|
:top="mescrollTop">
|
||||||
|
<view class="sidebar-margin body-bottom" v-if="orderList.length">
|
||||||
|
<view class="mb-[15rpx]" v-for="(item,index) in orderList" :key="item.id">
|
||||||
|
|
||||||
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
<view class="flex justify-between p-[20rpx]">
|
||||||
|
<view class="u-body-item-title u-line-2">{{item.code}}</view>
|
||||||
|
<view>
|
||||||
|
<up-tag v-if="item.storage_status == 2" :text="item.status_text" plain
|
||||||
|
size="mini"></up-tag>
|
||||||
|
<up-tag v-if="item.storage_status == 3" :text="item.status_text" type="success"
|
||||||
|
plain size="mini"></up-tag>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="body">
|
||||||
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('supplierId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.supplier?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('contact') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.supplier?.contact}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('phone') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.supplier?.phone}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '录入人' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.enter_name }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '入库人' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.store_name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('createTime') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.create_time}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
<text style="margin-right: 60rpx;">图片:</text>
|
||||||
|
<view>
|
||||||
|
<up-upload :fileList="listImageList[index]"
|
||||||
|
@afterRead="(evnet:any)=>afterRead(evnet,item.id,index)"
|
||||||
|
@delete="(evnet:any)=>listImageDelete(evnet,item.id,index)" width="140rpx"
|
||||||
|
height="140rpx" multiple :maxCount="5" accept="image"
|
||||||
|
:capture="['camera']"></up-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
<text style="margin-right: 14rpx;">检验图片:</text>
|
||||||
|
<view>
|
||||||
|
<up-upload :fileList="inspectionImageList[index]"
|
||||||
|
@afterRead="(evnet:any)=>inspectionAfterRead(evnet,item.id,index)"
|
||||||
|
@delete="(evnet:any)=>inspectionListImageDelete(evnet,item.id,index)" width="140rpx"
|
||||||
|
height="140rpx" multiple :maxCount="5" accept="image"
|
||||||
|
:capture="['camera']"></up-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="foot border-0 border-t-1 border-solid border-[#ddd]">
|
||||||
|
<view class="flex justify-end p-[20rpx]">
|
||||||
|
<view><up-button v-if="item.storage_status == 2" size="mini"
|
||||||
|
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx'}"
|
||||||
|
type="primary" text="立即入库" @click="handleEnteringWarehouse(item)"></up-button>
|
||||||
|
</view>
|
||||||
|
<view><up-button size="mini"
|
||||||
|
:customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'10rpx'}"
|
||||||
|
type="success" :text=" t('detailGo')"
|
||||||
|
@click="redirect({ url: '/addon/erp/pages/inbound/stockPending/detail',param:{id: item.id} })"></up-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<mescroll-empty v-if="!orderList.length && !loading &&!listLoading"></mescroll-empty>
|
||||||
|
|
||||||
|
</mescroll-body>
|
||||||
|
<loading-page :loading="loading"></loading-page>
|
||||||
|
<!-- 立即入库模态框 -->
|
||||||
|
<up-modal :show="enteringWarehouseShow" @confirm="enteringWarehouseConfirm" showCancelButton
|
||||||
|
@cancel="enteringWarehouseShow = false" :title="'提示'" :content="'确定要入库该数据吗?'"
|
||||||
|
ref="enteringWarehouseModal"></up-modal>
|
||||||
|
<!-- 图片删除 -->
|
||||||
|
<up-modal :show="delWarehouseImgShow" @confirm="delOutWarehouseImgConfirm" showCancelButton
|
||||||
|
@cancel="delWarehouseImgShow = false" :title="'提示'" :content="'确定要删除该图片吗?'"
|
||||||
|
ref="delWarehouseImgModal"></up-modal>
|
||||||
|
<!-- <view class="fixed bottom-4 right-4 z-2">
|
||||||
|
<up-button @click="redirect({ url: '/addon/erp/pages/inbound/stockPending/add'})" type="primary"
|
||||||
|
shape="circle" :customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
||||||
|
<u-icon size="30" color="#fff" name="plus-circle-fill"></u-icon>
|
||||||
|
</up-button>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { t } from '@/locale';
|
||||||
|
import { redirect, pxToRpx } from '@/utils/common';
|
||||||
|
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
||||||
|
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
||||||
|
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
||||||
|
import { getManualList, getManualStatus, getManualInfo, putInStorage, setManualImg } from '@/addon/erp/api/purchase';
|
||||||
|
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
||||||
|
import { checkBtnPermission } from '@/utils/auth';
|
||||||
|
import useMemberStore from '@/stores/member'
|
||||||
|
import { uploadImage } from '@/app/api/system'
|
||||||
|
import { img } from '@/utils/common'
|
||||||
|
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
||||||
|
interface FileItem {
|
||||||
|
url : string;
|
||||||
|
status ?: string;
|
||||||
|
message ?: string;
|
||||||
|
}
|
||||||
|
const imgTemp = ref({
|
||||||
|
index: 0,
|
||||||
|
imgIndex: 0,
|
||||||
|
type: 1
|
||||||
|
})
|
||||||
|
const listImageList = ref<Array<Array<FileItem>>>([]);
|
||||||
|
const inspectionImageList = ref<Array<Array<FileItem>>>([]);
|
||||||
|
const enteringWarehouseId = ref('')
|
||||||
|
const subsectionCurrent = ref(0)
|
||||||
|
const enteringWarehouseShow = ref(false);
|
||||||
|
const delWarehouseImgShow = ref(false);
|
||||||
|
const statusList = ref<any[]>([]);
|
||||||
|
const searchParams = ref<any>({
|
||||||
|
status: 2,
|
||||||
|
});
|
||||||
|
const memberStore = useMemberStore()
|
||||||
|
// 获取系统状态栏的高度
|
||||||
|
let menuButtonInfo : any = {};
|
||||||
|
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
||||||
|
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
||||||
|
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
// 获取状态
|
||||||
|
getManualStatus().then((res : any) => {
|
||||||
|
statusList.value = Object.values(res.data);
|
||||||
|
subsectionCurrent.value = statusList.value.findIndex((item : any) => item === '待入库')
|
||||||
|
});
|
||||||
|
imgTemp.value.index = 0
|
||||||
|
imgTemp.value.imgIndex = 0
|
||||||
|
listImageList.value = []
|
||||||
|
inspectionImageList.value = []
|
||||||
|
})
|
||||||
|
// 立即入库
|
||||||
|
const handleEnteringWarehouse = async (item : any) => {
|
||||||
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_manual_inbound_takeOutOfStorage')
|
||||||
|
if (!hasPermission) return
|
||||||
|
enteringWarehouseShow.value = true
|
||||||
|
enteringWarehouseId.value = item.id
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认立即入库
|
||||||
|
const enteringWarehouseConfirm = () => {
|
||||||
|
if (enteringWarehouseId.value == '') {
|
||||||
|
uni.showToast({ icon: 'none', title: t("Invalid ID") });
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
putInStorage(enteringWarehouseId.value)
|
||||||
|
.then((res : any) => {
|
||||||
|
if (res.code === 1) {
|
||||||
|
getMescroll().resetUpScroll();
|
||||||
|
enteringWarehouseId.value = '';
|
||||||
|
enteringWarehouseShow.value = false;
|
||||||
|
}
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分段器改变事件
|
||||||
|
const handleChange = (index : number) => {
|
||||||
|
searchParams.value.status = index === 0 ? 2 : 3;
|
||||||
|
getMescroll().resetUpScroll();
|
||||||
|
}
|
||||||
|
|
||||||
|
const mescrollTop = "20rpx"
|
||||||
|
|
||||||
|
const orderList = ref<Array<any>>([]),
|
||||||
|
loading = ref<boolean>(true),
|
||||||
|
listLoading = ref<boolean>(true),
|
||||||
|
mescrollRef = ref(null);
|
||||||
|
|
||||||
|
interface mescrollStructure {
|
||||||
|
num : number,
|
||||||
|
size : number,
|
||||||
|
endSuccess : Function,
|
||||||
|
[propName : string] : any
|
||||||
|
}
|
||||||
|
|
||||||
|
const getListFn = (mescroll : mescrollStructure) => {
|
||||||
|
listLoading.value = true;
|
||||||
|
let data : Object = {
|
||||||
|
page: mescroll.num,
|
||||||
|
limit: mescroll.size,
|
||||||
|
storage_status: searchParams.value.status
|
||||||
|
};
|
||||||
|
getManualList(data).then((res : any) => {
|
||||||
|
let newArr = res.data.data;
|
||||||
|
let newImg = res.data.data.reduce((acc : any, item : any) => {
|
||||||
|
let image_arr : any = []
|
||||||
|
if (item.inbound_image) {
|
||||||
|
const image_split_arr = item.inbound_image.split(',')
|
||||||
|
image_split_arr.forEach((arr : any) => {
|
||||||
|
image_arr.push({
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: img(arr),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
acc.push(image_arr)
|
||||||
|
return acc
|
||||||
|
}, [])
|
||||||
|
let newImg2 = res.data.data.reduce((acc : any, item : any) => {
|
||||||
|
let image_arr : any = []
|
||||||
|
if (item.inspection_report_image) {
|
||||||
|
const image_split_arr = item.inspection_report_image.split(',')
|
||||||
|
image_split_arr.forEach((arr : any) => {
|
||||||
|
image_arr.push({
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: img(arr),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
acc.push(image_arr)
|
||||||
|
return acc
|
||||||
|
}, [])
|
||||||
|
mescroll.endSuccess(newArr.length);
|
||||||
|
//设置列表数据
|
||||||
|
if (mescroll.num == 1) {
|
||||||
|
listImageList.value = []
|
||||||
|
inspectionImageList.value = []
|
||||||
|
orderList.value = []; //如果是第一页需手动制空列表
|
||||||
|
}
|
||||||
|
orderList.value = orderList.value.concat(newArr);
|
||||||
|
listImageList.value = listImageList.value.concat(newImg);
|
||||||
|
inspectionImageList.value = inspectionImageList.value.concat(newImg2);
|
||||||
|
listLoading.value = false;
|
||||||
|
loading.value = false;
|
||||||
|
}).catch((err) => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
listLoading.value = false;
|
||||||
|
loading.value = false;
|
||||||
|
mescroll.endErr(); // 请求失败, 结束加载
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const afterRead = async (event : any, rowId : any, rowIndex : number) => {
|
||||||
|
enteringWarehouseId.value = rowId
|
||||||
|
imgTemp.value.index = rowIndex
|
||||||
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists : FileItem[] = [].concat(event.file);
|
||||||
|
let fileListLen = listImageList.value[rowIndex].length;
|
||||||
|
lists = lists.filter((item : FileItem) => item.url);
|
||||||
|
lists.map((item : any) => {
|
||||||
|
listImageList.value[rowIndex].push({
|
||||||
|
url: item.url,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await uploadFilePromise(lists[i].url);
|
||||||
|
let item = listImageList.value[rowIndex][fileListLen];
|
||||||
|
listImageList.value[rowIndex].splice(fileListLen, 1, {
|
||||||
|
...item,
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: img(result as string),
|
||||||
|
});
|
||||||
|
fileListLen++;
|
||||||
|
}
|
||||||
|
handleSetOutWarehouseImg(rowId, rowIndex)
|
||||||
|
}
|
||||||
|
const inspectionAfterRead = async (event : any, rowId : any, rowIndex : number) => {
|
||||||
|
enteringWarehouseId.value = rowId
|
||||||
|
imgTemp.value.index = rowIndex
|
||||||
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists : FileItem[] = [].concat(event.file);
|
||||||
|
let fileListLen = inspectionImageList.value[rowIndex].length;
|
||||||
|
lists = lists.filter((item : FileItem) => item.url);
|
||||||
|
lists.map((item : any) => {
|
||||||
|
inspectionImageList.value[rowIndex].push({
|
||||||
|
url: item.url,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await uploadFilePromise(lists[i].url);
|
||||||
|
let item = inspectionImageList.value[rowIndex][fileListLen];
|
||||||
|
inspectionImageList.value[rowIndex].splice(fileListLen, 1, {
|
||||||
|
...item,
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: img(result as string),
|
||||||
|
});
|
||||||
|
fileListLen++;
|
||||||
|
}
|
||||||
|
handleSetOutWarehouseImg(rowId, rowIndex)
|
||||||
|
}
|
||||||
|
|
||||||
|
const uploadFilePromise = (url : any) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let a = uploadImage({
|
||||||
|
filePath: url,
|
||||||
|
name: 'file'
|
||||||
|
}).then((res : any) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(res.data.url as string);
|
||||||
|
}, 1000);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const listImageDelete = (event : any, rowId : any, rowIndex : number) => {
|
||||||
|
if (event.index !== undefined && event.file !== undefined) {
|
||||||
|
delWarehouseImgShow.value = true
|
||||||
|
imgTemp.value.imgIndex = event.index
|
||||||
|
imgTemp.value.index = rowIndex
|
||||||
|
imgTemp.value.type = 1
|
||||||
|
enteringWarehouseId.value = rowId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const inspectionListImageDelete = (event : any, rowId : any, rowIndex : number) => {
|
||||||
|
if (event.index !== undefined && event.file !== undefined) {
|
||||||
|
delWarehouseImgShow.value = true
|
||||||
|
imgTemp.value.imgIndex = event.index
|
||||||
|
imgTemp.value.index = rowIndex
|
||||||
|
imgTemp.value.type = 2
|
||||||
|
enteringWarehouseId.value = rowId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 删除照片确认
|
||||||
|
const delOutWarehouseImgConfirm = () => {
|
||||||
|
const { imgIndex, index, type } = imgTemp.value
|
||||||
|
const currentFileList = getCurrentFileList(type, index);
|
||||||
|
currentFileList.splice(imgIndex, 1);
|
||||||
|
updateListImageList(type, currentFileList);
|
||||||
|
delWarehouseImgShow.value = false
|
||||||
|
handleSetOutWarehouseImg(enteringWarehouseId.value, index)
|
||||||
|
}
|
||||||
|
// 获取当前文件列表
|
||||||
|
const getCurrentFileList = (type : number, index : number) : any[] => {
|
||||||
|
return type === 1 ? listImageList.value[index] : inspectionImageList.value[index];
|
||||||
|
}
|
||||||
|
// 更新 listImageList 或 inspectionImageList
|
||||||
|
const updateListImageList = (type : number, fileList : any[]) => {
|
||||||
|
if (type === 1) {
|
||||||
|
listImageList.value = [...listImageList.value];
|
||||||
|
} else {
|
||||||
|
inspectionImageList.value = [...inspectionImageList.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 保存入库单的照片
|
||||||
|
const handleSetOutWarehouseImg = (id : any, rowIndex : number) => {
|
||||||
|
let param = {
|
||||||
|
inbound_image: '',
|
||||||
|
inspection_report_image: '',
|
||||||
|
}
|
||||||
|
if (listImageList.value[rowIndex].length > 0) {
|
||||||
|
const imgUrls = listImageList.value[rowIndex].map((item : any) => {
|
||||||
|
return `upload${item.url.split('upload')[1]}`
|
||||||
|
})
|
||||||
|
param.inbound_image = imgUrls.join(',')
|
||||||
|
}
|
||||||
|
if (inspectionImageList.value[rowIndex].length > 0) {
|
||||||
|
const imgUrls = inspectionImageList.value[rowIndex].map((item : any) => {
|
||||||
|
return `upload${item.url.split('upload')[1]}`
|
||||||
|
})
|
||||||
|
param.inspection_report_image = imgUrls.join(',')
|
||||||
|
}
|
||||||
|
setManualImg(id, param).then((res : any) => {
|
||||||
|
if (res.code === 1) {
|
||||||
|
getOutWarehouseInfo(id)
|
||||||
|
}
|
||||||
|
}).catch(() => { getOutWarehouseInfo(id) });
|
||||||
|
}
|
||||||
|
//根据入库单id获取详情
|
||||||
|
const getOutWarehouseInfo = async (id : number) => {
|
||||||
|
const res : any = await getManualInfo(id);
|
||||||
|
if (res.code === 1) {
|
||||||
|
const { data } = res
|
||||||
|
const { index } = imgTemp.value
|
||||||
|
if (data.inbound_image) {
|
||||||
|
const image_split_arr = data.inbound_image.split(',')
|
||||||
|
let image_arr : any = []
|
||||||
|
image_split_arr.forEach((arr : any) => {
|
||||||
|
image_arr.push({
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: img(arr),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
listImageList.value[index] = image_arr
|
||||||
|
} else {
|
||||||
|
listImageList.value[index] = []
|
||||||
|
}
|
||||||
|
if (data.inspection_report_image) {
|
||||||
|
const image_split_arr = data.inspection_report_image.split(',')
|
||||||
|
let image_arr : any = []
|
||||||
|
image_split_arr.forEach((arr : any) => {
|
||||||
|
image_arr.push({
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: img(arr),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
inspectionImageList.value[index] = image_arr
|
||||||
|
} else {
|
||||||
|
inspectionImageList.value[index] = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
const diy = useDiy({
|
const diy = useDiy({
|
||||||
name: "DIY_ERP_INDEX"
|
name: "DIY_ERP_INDEX"
|
||||||
})
|
})
|
||||||
|
|
||||||
const diyGroupRef = ref(null)
|
const diyGroupRef = ref(null)
|
||||||
|
|
||||||
const wxPrivacyPopupRef:any = ref(null)
|
const wxPrivacyPopupRef:any = ref(null)
|
||||||
|
|||||||
@@ -5,60 +5,90 @@
|
|||||||
labelWidth="150rpx">
|
labelWidth="150rpx">
|
||||||
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
||||||
<view>
|
<view>
|
||||||
<up-form-item :label="t('warehouseName')" prop="type" required borderBottom>
|
<up-form-item :label="'单据编号'" prop="code" required borderBottom>
|
||||||
<view class="flex w-full items-center h-[52rpx]" @click="warehouseSheetShow = true">
|
<u-input fontSize="28rpx" v-model="formData.code" disabled clearable
|
||||||
<view v-if="!formData.warehouse_id" class="text-[#888] text-[28rpx] flex-1">
|
placeholderStyle="color: #888" :placeholder="'请输入单据编号'" />
|
||||||
{{ t('warehouseNamePlaceholder') }}
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="text-[28rpx] flex-1 leading-[1.4]">{{ formData.warehouse_name }}</view>
|
<view class="mt-[16rpx]">
|
||||||
</view>
|
<up-form-item :label="'制单日期'" prop="billing_time" required borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model="formData.billing_time" disabled clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="'请选择制单日期'" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'盘点日期'" prop="check_time" required borderBottom @click="checkTimeShow = true">
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<up-datetime-picker hasInput :show="checkTimeShow" v-model="formData.check_time" mode="date" :placeholder="'请选择盘点日期'" @confirm="checkTimeConfirm" @cancel="checkTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<u-input fontSize="28rpx" v-model="formData.check_time" readonly
|
||||||
|
placeholderStyle="color: #888" placeholder="请选择盘点日期" />
|
||||||
|
<up-datetime-picker :show="checkTimeShow" v-model="check_time_new" mode="date" :placeholder="'请选择盘点日期'" @confirm="checkTimeConfirm" @cancel="checkTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'仓库名称'" prop="warehouse_id" required borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.warehouse_id" :localdata="warehouseList" dataKey="name" dataValue="id"
|
||||||
|
:clear="false" placeholder="请选择仓库" @change="updateSexWarehouse"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.warehouse_id" :options="warehouseList" dataKey="name" dataValue="id" placeholder="请选择仓库" :height="38" @change="updateSexWarehouse"/>
|
||||||
|
<!-- #endif -->
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('productName')" prop="product_id" required borderBottom>
|
<up-form-item :label="t('productName')" prop="product_id" required borderBottom>
|
||||||
<view class="flex w-full items-center h-[52rpx]" @click="productSheetShow = true">
|
<!-- #ifdef H5 -->
|
||||||
<view v-if="!formData.product_id" class="text-[#888] text-[28rpx] flex-1">
|
<zxz-uni-data-select v-model="formData.product_id" :localdata="productList" dataKey="name" dataValue="product_id"
|
||||||
{{ t('productName') }}
|
:clear="false" :disabled="productList.length === 0" placeholder="请选择食材" @change="productIdChange"/>
|
||||||
</view>
|
<!-- #endif -->
|
||||||
<view v-else class="text-[28rpx] flex-1 leading-[1.4]">{{ formData.product_name }}</view>
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
</view>
|
<wht-select v-model="formData.product_id" :options="productList" dataKey="name" dataValue="product_id" placeholder="请选择食材" :height="38" :disabled="productList.length === 0" @change="productIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'批次号'" prop="inventory_id" borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.inventory_id" :localdata="batchNumberList" dataKey="batch_number" dataValue="inventory_id"
|
||||||
|
:clear="false" :disabled="batchNumberList.length === 0" placeholder="请选择批次号" @change="inventoryIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.inventory_id" :options="batchNumberList" dataKey="batch_number" dataValue="inventory_id" placeholder="请选择批次号" :height="38" :disabled="batchNumberList.length === 0" @change="inventoryIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('surfaceNum')" prop="surface_num" borderBottom>
|
<up-form-item :label="t('surfaceNum')" prop="surface_num" borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model.trim="formData.surface_num" readOnly disabled border="none"
|
<u-input fontSize="28rpx" v-model.trim="formData.surface_num" readOnly disabled
|
||||||
clearable placeholderStyle="color: #888" :placeholder="t('surfaceNumPlaceholder')" />
|
clearable placeholderStyle="color: #888" :placeholder="t('surfaceNumPlaceholder')" />
|
||||||
|
<view v-show="formData.freeze">(其中因未完成出库单占用的冻结数量:{{ formData.freeze }})</view>
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'盘点结果'" prop="type" required borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.type" :localdata="typeList" dataKey="name" dataValue="name"
|
||||||
|
:clear="false" placeholder="请选择盘点结果"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.type" :options="typeList" dataKey="name" dataValue="name" placeholder="请选择盘点结果" :height="38" @change="typeChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-[16rpx]">
|
<view class="mt-[16rpx]">
|
||||||
<up-form-item :label="t('number')" prop="number" required borderBottom>
|
<up-form-item :label="'操作数量'" prop="number" required borderBottom>
|
||||||
<u-input fontSize="28rpx" v-model.trim="formData.number" border="none" clearable
|
<u-input fontSize="28rpx" v-model.trim="formData.number" clearable
|
||||||
placeholderStyle="color: #888" :placeholder="t('numberPlaceholder')" />
|
placeholderStyle="color: #888" :placeholder="'请输入操作数量'" />
|
||||||
</up-form-item>
|
|
||||||
</view>
|
|
||||||
<view class="mt-[16rpx]">
|
|
||||||
<up-form-item :label="t('type')" prop="type" required borderBottom>
|
|
||||||
<up-radio-group v-model="formData.type" placement="row">
|
|
||||||
<up-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in typeList"
|
|
||||||
:key="index" :label="item" :name="index">
|
|
||||||
</up-radio>
|
|
||||||
</up-radio-group>
|
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</up-form>
|
</up-form>
|
||||||
<!-- 仓库 -->
|
|
||||||
<u-action-sheet class="" :actions="warehouseList" :show="warehouseSheetShow" :closeOnClickOverlay="true"
|
|
||||||
:safeAreaInsetBottom="true" @close="warehouseSheetShow = false"
|
|
||||||
@select="updateSexWarehouse"></u-action-sheet>
|
|
||||||
|
|
||||||
<!-- 产品 -->
|
|
||||||
<u-action-sheet class="" :actions="productList" :show="productSheetShow" :closeOnClickOverlay="true"
|
|
||||||
:safeAreaInsetBottom="true" @close="productSheetShow = false" @select="updateSexProduct"></u-action-sheet>
|
|
||||||
|
|
||||||
<view class="w-full footer">
|
<view class="w-full footer">
|
||||||
<view
|
<view
|
||||||
@@ -77,12 +107,22 @@
|
|||||||
import { t } from '@/locale'
|
import { t } from '@/locale'
|
||||||
import { onLoad, onReady } from '@dcloudio/uni-app';
|
import { onLoad, onReady } from '@dcloudio/uni-app';
|
||||||
import { getWarehouseSelect } from '@/addon/erp/api/base';
|
import { getWarehouseSelect } from '@/addon/erp/api/base';
|
||||||
import { addInventory, getInventoryTypeList, getInventoryProduct } from '@/addon/erp/api/inventory';
|
import { getMemberInfo } from '@/addon/erp/api/member';
|
||||||
|
import { generatedCode } from '@/addon/erp/utils/common';
|
||||||
|
import { addCheck, getCheckTypeList, getCheckProduct } from '@/addon/erp/api/inventory';
|
||||||
import { redirect } from '@/utils/common';
|
import { redirect } from '@/utils/common';
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
import { checkBtnPermission } from '@/utils/auth';
|
||||||
|
import useMemberStore from '@/stores/member'
|
||||||
|
|
||||||
|
const memberStore = useMemberStore()
|
||||||
|
|
||||||
const formRef : any = ref(null)
|
const formRef : any = ref(null)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
const billingTimeShow = ref(false)
|
||||||
|
const checkTimeShow = ref(false)
|
||||||
const typeList = ref<any[]>([]);
|
const typeList = ref<any[]>([]);
|
||||||
|
const batchNumberList = ref<any[]>([]);
|
||||||
|
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
// 'supplier_id': {
|
// 'supplier_id': {
|
||||||
@@ -99,32 +139,41 @@
|
|||||||
|
|
||||||
|
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: "",
|
id: '',
|
||||||
warehouse_id: "",
|
code: generatedCode('PD'),
|
||||||
warehouse_name: "",
|
billing_time: dayjs().format('YYYY-MM-DD'),
|
||||||
product_id: "",
|
check_time: dayjs().format('YYYY-MM-DD'),
|
||||||
product_name: "",
|
operator_id:'',
|
||||||
surface_num: "",
|
warehouse_id: '',
|
||||||
number: "",
|
inventory_id: '',
|
||||||
real_num: "",
|
product_id: '',
|
||||||
type: "",
|
surface_num: '',
|
||||||
|
freeze: '',
|
||||||
|
number: '',
|
||||||
|
real_num: '',
|
||||||
|
type: ''
|
||||||
})
|
})
|
||||||
|
const check_time_new=ref(dayjs().format('YYYY-MM-DD'))
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
formRef.value.setRules(rules);
|
formRef.value.setRules(rules);
|
||||||
})
|
})
|
||||||
|
const getOperator = async () => {
|
||||||
|
const res = await getMemberInfo();
|
||||||
|
return res.data?.adminInfo?.uid || '';
|
||||||
|
}
|
||||||
// 页面加载
|
// 页面加载
|
||||||
onLoad((option : any) => {
|
onLoad(async (option : any) => {
|
||||||
getTypeAllFn();
|
getTypeAllFn();
|
||||||
getWarehouseList();
|
getWarehouseList();
|
||||||
|
formData.value.operator_id = await getOperator();
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取状态
|
// 获取状态
|
||||||
const getTypeAllFn = () => {
|
const getTypeAllFn = () => {
|
||||||
getInventoryTypeList().then((res) => {
|
getCheckTypeList().then((res) => {
|
||||||
typeList.value = res.data;
|
const data= Object.values(res.data);
|
||||||
|
typeList.value =data.map((item:any)=>{
|
||||||
|
return {name:item}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -132,12 +181,15 @@
|
|||||||
/**
|
/**
|
||||||
* 仓库
|
* 仓库
|
||||||
*/
|
*/
|
||||||
const warehouseSheetShow = ref(false)
|
|
||||||
const warehouseList = ref<any[]>([]);
|
const warehouseList = ref<any[]>([]);
|
||||||
const updateSexWarehouse = (e : any) => {
|
const updateSexWarehouse = (e : any) => {
|
||||||
formData.value.warehouse_id = e.id;
|
formData.value.warehouse_id = e.id;
|
||||||
formData.value.warehouse_name = e.name;
|
formData.value.inventory_id = ''
|
||||||
getInventoryProduct({
|
formData.value.product_id = ''
|
||||||
|
formData.value.surface_num = ''
|
||||||
|
formData.value.freeze = ''
|
||||||
|
batchNumberList.value = []
|
||||||
|
getCheckProduct({
|
||||||
warehouse_id: e.id,
|
warehouse_id: e.id,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
productList.value = res.data;
|
productList.value = res.data;
|
||||||
@@ -154,50 +206,62 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const checkTimeConfirm = (e : any) => {
|
||||||
// 产品
|
formData.value.check_time = uni.$u.date(e.value, 'yyyy-mm-dd');
|
||||||
const productSheetShow = ref(false);
|
checkTimeShow.value = false;
|
||||||
|
}
|
||||||
|
// 食材
|
||||||
const productList = ref<any[]>([]);
|
const productList = ref<any[]>([]);
|
||||||
const updateSexProduct = (e : any) => {
|
const productIdChange = (e : any) => {
|
||||||
formData.value.product_id = e.id;
|
formData.value.product_id = e.product_id;
|
||||||
formData.value.product_name = e.name;
|
|
||||||
|
|
||||||
handleProductIdChange(e.id);
|
handleProductIdChange(e.product_id);
|
||||||
|
}
|
||||||
|
// 批次号
|
||||||
|
const inventoryIdChange = (e : any) => {
|
||||||
|
formData.value.inventory_id = e.inventory_id;
|
||||||
|
}
|
||||||
|
// 盘点结果
|
||||||
|
const typeChange = (e : any) => {
|
||||||
|
formData.value.type = e.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 产品选择事件
|
// 食材选择事件
|
||||||
const handleProductIdChange = (val : number) => {
|
const handleProductIdChange = (val : number) => {
|
||||||
const product = productList.value.find((item) => item.id === val);
|
const product = productList.value.find((item) => item.product_id === val);
|
||||||
|
batchNumberList.value = productList.value.filter((item) => item.product_id === val)
|
||||||
if (product) {
|
if (product) {
|
||||||
formData.value.surface_num = product.surface_num;
|
formData.value.surface_num = product.surface_num;
|
||||||
|
formData.value.freeze = product.freeze
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
const handSave = () => {
|
const handSave = async() => {
|
||||||
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission,'erp_inventory_check_add')
|
||||||
|
if (!hasPermission) return
|
||||||
if (loading.value) return
|
if (loading.value) return
|
||||||
|
|
||||||
if (!formData.value.warehouse_id) {
|
if (!formData.value.warehouse_id) {
|
||||||
uni.showToast({ icon: 'none', title: t('warehouseNamePlaceholder') })
|
uni.showToast({ icon: 'none', title: '请选择仓库' })
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!formData.value.product_id) {
|
if (!formData.value.product_id) {
|
||||||
uni.showToast({ icon: 'none', title: t('productNamePlaceholder') })
|
uni.showToast({ icon: 'none', title: '请选择食材' })
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!formData.value.number) {
|
if (!formData.value.number) {
|
||||||
uni.showToast({ icon: 'none', title: t('numberPlaceholder') })
|
uni.showToast({ icon: 'none', title: '请输入操作数量' })
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!formData.value.type) {
|
if (!formData.value.type) {
|
||||||
uni.showToast({ icon: 'none', title: t('typePlaceholder') })
|
uni.showToast({ icon: 'none', title: '请选择盘点结果' })
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
formData.value.check_time = uni.$u.date(formData.value.check_time, 'yyyy-mm-dd');
|
||||||
addInventory(formData.value).then((res : any) => {
|
addCheck(formData.value).then((res : any) => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
redirect({ url: '/addon/erp/pages/inventory/inventory/list' })
|
redirect({ url: '/addon/erp/pages/inventory/inventory/list' })
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
||||||
|
<up-subsection :list="statusList" mode="subsection" :current="0" @change="handleChange" />
|
||||||
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" height="auto" @up="getListFn"
|
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" height="auto" @up="getListFn"
|
||||||
:top="mescrollTop">
|
:top="mescrollTop">
|
||||||
<view class="sidebar-margin body-bottom" v-if="inventoryList.length">
|
<view class="sidebar-margin body-bottom" v-if="inventoryList.length">
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<view class="bg-[#ffffff] rounded-10rpx">
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
<view class="flex justify-between p-[20rpx]">
|
<view class="flex justify-between p-[20rpx]">
|
||||||
<view class="u-body-item-title u-line-2">{{item.products.name}}</view>
|
<view class="u-body-item-title u-line-2">{{item.code}}</view>
|
||||||
<view>
|
<view>
|
||||||
<up-tag :text="item.type" type="warning" plain size="mini"></up-tag>
|
<up-tag :text="item.type" type="warning" plain size="mini"></up-tag>
|
||||||
|
|
||||||
@@ -18,30 +18,42 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="flex justify-start flex-col p-[20rpx]">
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
食材名称:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.name}}</text>
|
||||||
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productSpec') }}:<text
|
{{ t('productSpec') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.products?.spec}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.spec}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productUnit') }}:<text
|
{{ t('productUnit') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.products?.productUnit?.name}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.productUnit?.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('warehouseName') }}:<text
|
{{ t('warehouseName') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.warehouse?.name}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.warehouse?.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
批次号:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.inventory?.batch_number}}</text>
|
||||||
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('surfaceNum') }}:<text
|
{{ t('surfaceNum') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.surface_num}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.surface_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('number') }}:<text
|
操作数量:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.number}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.number}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('realNum') }}:<text
|
{{ t('realNum') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.real_num}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.real_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
状态:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.status_text}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('updateTime') }}:<text
|
{{ t('updateTime') }}:<text
|
||||||
@@ -50,6 +62,13 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="foot border-0 border-t-1 border-solid border-[#ddd]">
|
||||||
|
<view class="flex justify-end p-[20rpx]">
|
||||||
|
<view><up-button v-if="item.status == 0" size="mini" :customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}" type="primary" text="通过" @click="handleOperateOrder(item,'audit')"></up-button></view>
|
||||||
|
<view><up-button v-if="item.status == 0" size="mini" :customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}" type="error" text="拒绝" @click="handleOperateOrder(item,'notAudit')"></up-button></view>
|
||||||
|
<view><up-button v-if="item.status == 1" size="mini" :customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx',fontSize:'20rpx'}" type="primary" text="立即入库" @click="handleOperateOrder(item,'storage')"></up-button></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -57,13 +76,27 @@
|
|||||||
|
|
||||||
</mescroll-body>
|
</mescroll-body>
|
||||||
<loading-page :loading="loading"></loading-page>
|
<loading-page :loading="loading"></loading-page>
|
||||||
<view class="fixed bottom-4 right-4 z-2">
|
<!-- <view class="fixed bottom-4 right-4 z-2">
|
||||||
<up-button @click="redirect({ url: '/addon/erp/pages/inventory/inventory/add'})" type="primary"
|
<up-button @click="redirect({ url: '/addon/erp/pages/inventory/inventory/add'})" type="primary"
|
||||||
shape="circle" :customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
shape="circle" :customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
||||||
<u-icon size="30" color="#fff" name="plus-circle-fill"></u-icon>
|
<u-icon size="30" color="#fff" name="plus-circle-fill"></u-icon>
|
||||||
</up-button>
|
</up-button>
|
||||||
</view>
|
</view> -->
|
||||||
|
<!-- 通过审核模态框 -->
|
||||||
|
<up-modal :show="auditOrderShow" @confirm="auditOrderConfirm" showCancelButton @cancel="auditOrderShow = false"
|
||||||
|
:title="'提示'" :content="'确定要通过审核该数据吗?'" ref="auditOrderModal"></up-modal>
|
||||||
|
<!-- 立即入库模态框 -->
|
||||||
|
<up-modal :show="storageOrderShow" @confirm="storageOrderConfirm" showCancelButton @cancel="storageOrderShow = false"
|
||||||
|
:title="'提示'" :content="'确定要立即入库该数据吗?'" ref="storageOrderModal"></up-modal>
|
||||||
|
<!-- 拒绝审核模态框 -->
|
||||||
|
<up-modal :show="notAuditOrderShow" @confirm="notAuditOrderConfirm" showCancelButton @cancel="notAuditOrderShow = false"
|
||||||
|
:title="'提示'" ref="notAuditOrderModal">
|
||||||
|
<view class="slot-content">
|
||||||
|
<view>确定要拒绝该数据吗?</view>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="refuseReason" clearable
|
||||||
|
placeholderStyle="color: #888" placeholder="请输入拒绝原因" />
|
||||||
|
</view>
|
||||||
|
</up-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -74,17 +107,108 @@
|
|||||||
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
||||||
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
||||||
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
||||||
import { getInventoryList } from '@/addon/erp/api/inventory';
|
import { getCheckList,getCheckTypeList,updateCheckStatus,putInStorage} from '@/addon/erp/api/inventory';
|
||||||
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
||||||
|
import { checkBtnPermission } from '@/utils/auth';
|
||||||
|
import useMemberStore from '@/stores/member'
|
||||||
|
|
||||||
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
||||||
|
|
||||||
|
const memberStore = useMemberStore()
|
||||||
const show = ref(false);
|
|
||||||
|
const auditOrderItem = ref<SellReturnItem | null>(null);
|
||||||
|
const auditOrderShow = ref(false);
|
||||||
|
const notAuditOrderShow = ref(false);
|
||||||
|
const storageOrderShow = ref(false);
|
||||||
|
const refuseReason=ref("")
|
||||||
|
const statusList = ref<any[]>([]);
|
||||||
const searchParams = ref<any>({
|
const searchParams = ref<any>({
|
||||||
status: undefined,
|
status: '增加',
|
||||||
});
|
});
|
||||||
|
onLoad(() => {
|
||||||
|
// 获取状态
|
||||||
|
getCheckTypeList().then((res:any) => {
|
||||||
|
statusList.value = Object.values(res.data);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
// 操作
|
||||||
|
const handleOperateOrder= async(item:any,type:string)=>{
|
||||||
|
if (type === 'audit') {
|
||||||
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_inventory_check_updateStatus')
|
||||||
|
if (!hasPermission) return
|
||||||
|
auditOrderShow.value = true
|
||||||
|
} else if (type === 'notAudit') {
|
||||||
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission,'erp_inventory_check_updateStatus')
|
||||||
|
if (!hasPermission) return
|
||||||
|
notAuditOrderShow.value = true
|
||||||
|
} else if (type === 'storage') {
|
||||||
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_inventory_check_putInStorage')
|
||||||
|
if (!hasPermission) return
|
||||||
|
storageOrderShow.value = true
|
||||||
|
}
|
||||||
|
refuseReason.value=""
|
||||||
|
auditOrderItem.value=item
|
||||||
|
}
|
||||||
|
// 确认审核
|
||||||
|
const auditOrderConfirm = () => {
|
||||||
|
if (!auditOrderItem.value) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '数据不存在',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
updateCheckStatus({ id: auditOrderItem.value.id,type: 'pass' })
|
||||||
|
.then((res:any) => {
|
||||||
|
if(res.code ===1){
|
||||||
|
getMescroll().resetUpScroll();
|
||||||
|
auditOrderItem.value = null;
|
||||||
|
auditOrderShow.value = false;
|
||||||
|
}
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
// 确认立即入库
|
||||||
|
const storageOrderConfirm = () => {
|
||||||
|
if (!auditOrderItem.value) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '数据不存在',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
putInStorage(auditOrderItem.value.id)
|
||||||
|
.then((res:any) => {
|
||||||
|
if(res.code ===1){
|
||||||
|
getMescroll().resetUpScroll();
|
||||||
|
auditOrderItem.value = null;
|
||||||
|
storageOrderShow.value = false;
|
||||||
|
}
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
// 确认拒绝通过审核
|
||||||
|
const notAuditOrderConfirm = () => {
|
||||||
|
if (!auditOrderItem.value) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '数据不存在',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
updateCheckStatus({ id: auditOrderItem.value.id,type: 'reject',reject_reason:refuseReason.value })
|
||||||
|
.then((res:any) => {
|
||||||
|
if(res.code ===1){
|
||||||
|
getMescroll().resetUpScroll();
|
||||||
|
auditOrderItem.value = null;
|
||||||
|
notAuditOrderShow.value = false;
|
||||||
|
}
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
// 分段器改变事件
|
||||||
|
const handleChange = (index : number) => {
|
||||||
|
searchParams.value.status = index===0?'增加':'减少';
|
||||||
|
getMescroll().resetUpScroll();
|
||||||
|
}
|
||||||
|
|
||||||
// 获取系统状态栏的高度
|
// 获取系统状态栏的高度
|
||||||
let menuButtonInfo : any = {};
|
let menuButtonInfo : any = {};
|
||||||
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
||||||
@@ -111,9 +235,9 @@
|
|||||||
let data : Object = {
|
let data : Object = {
|
||||||
page: mescroll.num,
|
page: mescroll.num,
|
||||||
limit: mescroll.size,
|
limit: mescroll.size,
|
||||||
status: searchParams.value.status
|
type: searchParams.value.status
|
||||||
};
|
};
|
||||||
getInventoryList(data).then((res : any) => {
|
getCheckList(data).then((res : any) => {
|
||||||
let newArr = res.data.data;
|
let newArr = res.data.data;
|
||||||
mescroll.endSuccess(newArr.length);
|
mescroll.endSuccess(newArr.length);
|
||||||
//设置列表数据
|
//设置列表数据
|
||||||
@@ -135,5 +259,5 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
</style>
|
</style>
|
||||||
@@ -9,10 +9,9 @@
|
|||||||
<view class="bg-[#ffffff] rounded-10rpx">
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
<view class="flex justify-between p-[20rpx]">
|
<view class="flex justify-between p-[20rpx]">
|
||||||
<view class="u-body-item-title u-line-2">{{item.products.name}}</view>
|
<view class="u-body-item-title u-line-2">{{item.product.name}}</view>
|
||||||
<view>
|
<view>
|
||||||
<up-tag :text="item.type" type="warning" plain size="mini"></up-tag>
|
<up-tag :text="item.type" type="warning" plain size="mini"></up-tag>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -20,11 +19,15 @@
|
|||||||
<view class="flex justify-start flex-col p-[20rpx]">
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productSpec') }}:<text
|
{{ t('productSpec') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.products?.spec}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.spec}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productUnit') }}:<text
|
{{ t('productUnit') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.products?.productUnit?.name}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.productUnit?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
批次号:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.batch_number}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('warehouseName') }}:<text
|
{{ t('warehouseName') }}:<text
|
||||||
|
|||||||
@@ -9,18 +9,25 @@
|
|||||||
<view class="bg-[#ffffff] rounded-10rpx">
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
<view class="flex justify-between p-[20rpx]">
|
<view class="flex justify-between p-[20rpx]">
|
||||||
<view class="u-body-item-title u-line-2">{{item.products.name}}</view>
|
<view class="u-body-item-title u-line-2">{{item.product.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="flex justify-start flex-col p-[20rpx]">
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productSpec') }}:<text
|
{{ t('productSpec') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.products?.spec}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.spec}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productUnit') }}:<text
|
{{ t('productUnit') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.products?.productUnit?.name}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.productUnit?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
批次号:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.batch_number}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
到期时间:<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.expiry_at}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('warehouseName') }}:<text
|
{{ t('warehouseName') }}:<text
|
||||||
@@ -48,7 +55,66 @@
|
|||||||
|
|
||||||
</mescroll-body>
|
</mescroll-body>
|
||||||
<loading-page :loading="loading"></loading-page>
|
<loading-page :loading="loading"></loading-page>
|
||||||
|
<up-popup :show="queryShow" mode="top" @close="queryClose">
|
||||||
|
<view class="query-popup">
|
||||||
|
<up-form labelPosition="left" :model="queryF" ref="queryForm">
|
||||||
|
<up-form-item label="所在仓库" labelWidth="160rpx">
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="queryF.warehouse_id" :localdata="warehouseList" dataKey="name" dataValue="id"
|
||||||
|
:clear="true" placeholder="请选择仓库" @change="warehouseIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="queryF.warehouse_id" :options="warehouseList" clearable dataKey="name" dataValue="id" placeholder="请选择仓库" :height="38" @change="warehouseIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
<up-form-item label="供应商" labelWidth="160rpx">
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="queryF.supplier_id" :localdata="supplierList" dataKey="name" dataValue="id"
|
||||||
|
:clear="true" placeholder="请选择供应商" @change="supplierIdChange" />
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="queryF.supplier_id" :options="supplierList" clearable dataKey="name" dataValue="id" placeholder="请选择供应商" :height="38" @change="supplierIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
<up-form-item label="批次号" labelWidth="160rpx">
|
||||||
|
<up-input v-model="queryF.batch_number" placeholder="请输入批次号"></up-input>
|
||||||
|
</up-form-item>
|
||||||
|
<up-form-item label="食材名称" labelWidth="160rpx">
|
||||||
|
<up-input v-model="queryF.product_name" placeholder="请输入食材名称"></up-input>
|
||||||
|
</up-form-item>
|
||||||
|
</up-form>
|
||||||
|
<view class="query-btn">
|
||||||
|
<up-button @click="resetQuery">重置</up-button>
|
||||||
|
<up-button type="primary" @click="submitQuery">确认</up-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</up-popup>
|
||||||
|
|
||||||
|
<view class="fixed bottom-4 right-4 z-2">
|
||||||
|
<up-button @click="querySearch" type="primary" shape="circle"
|
||||||
|
:customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
||||||
|
<u-icon size="30" color="#fff" name="search"></u-icon>
|
||||||
|
</up-button>
|
||||||
|
</view>
|
||||||
|
<view class="fixed bottom-18 right-4 z-2 smmarie-wprelationship">
|
||||||
|
<!-- <up-button @click="smmarieTip" type="primary" shape="circle"
|
||||||
|
:customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
||||||
|
<u-icon size="30" color="#fff" name="file-text"></u-icon>
|
||||||
|
</up-button> -->
|
||||||
|
<!-- <view class="sum-total" v-if="sumShow"> -->
|
||||||
|
<view class="sum-total">
|
||||||
|
<view style="overflow-y: auto;">
|
||||||
|
<view class="hd">
|
||||||
|
<view>库存总数:</view>
|
||||||
|
<view>{{sumF.total_quantity}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="hd">
|
||||||
|
<view>合计金额(元):</view>
|
||||||
|
<view>{{sumF.total_amount}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -60,16 +126,95 @@
|
|||||||
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
||||||
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
||||||
import { getWpRelationshipList } from '@/addon/erp/api/inventory';
|
import { getWpRelationshipList } from '@/addon/erp/api/inventory';
|
||||||
|
import { getWarehouseSelect,getSupplierSelect} from '@/addon/erp/api/base';
|
||||||
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
||||||
|
|
||||||
|
|
||||||
const show = ref(false);
|
const queryShow = ref(false);
|
||||||
const searchParams = ref<any>({
|
const sumShow = ref(false);
|
||||||
status: undefined,
|
|
||||||
});
|
const sumF = ref({
|
||||||
|
total_quantity: 0,
|
||||||
|
total_amount: 0.00
|
||||||
|
})
|
||||||
|
const queryF = ref({
|
||||||
|
batch_number: '',
|
||||||
|
warehouse_id: '',
|
||||||
|
product_name: '',
|
||||||
|
supplier_id: '',
|
||||||
|
hasQuery:0
|
||||||
|
})
|
||||||
|
|
||||||
|
// 页面加载
|
||||||
|
onLoad((option : any) => {
|
||||||
|
getWarehouseList()
|
||||||
|
getSupplierList();
|
||||||
|
queryF.value.hasQuery=0
|
||||||
|
sumShow.value=false
|
||||||
|
})
|
||||||
|
|
||||||
|
const querySearch = () => {
|
||||||
|
sumShow.value = false
|
||||||
|
queryShow.value = true
|
||||||
|
}
|
||||||
|
const queryClose = () => {
|
||||||
|
queryShow.value = false
|
||||||
|
}
|
||||||
|
const smmarieTip= ()=>{
|
||||||
|
sumShow.value =!sumShow.value
|
||||||
|
}
|
||||||
|
const resetQuery =()=>{
|
||||||
|
Object.keys(queryF.value ).forEach((key: string) => {
|
||||||
|
(queryF.value as any)[key] = ""
|
||||||
|
})
|
||||||
|
queryF.value.hasQuery=0
|
||||||
|
}
|
||||||
|
const submitQuery =()=>{
|
||||||
|
queryShow.value = false
|
||||||
|
queryF.value.hasQuery=1
|
||||||
|
getMescroll().resetUpScroll();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库
|
||||||
|
*/
|
||||||
|
const warehouseList = ref<any[]>([]);
|
||||||
|
const warehouseIdChange = (e : any) => {
|
||||||
|
queryF.value.warehouse_id = e.id;
|
||||||
|
}
|
||||||
|
// 获取仓库
|
||||||
|
const getWarehouseList = () => {
|
||||||
|
getWarehouseSelect({}).then((res : any) => {
|
||||||
|
warehouseList.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商
|
||||||
|
*/
|
||||||
|
const supplierList = ref<any[]>([]);
|
||||||
|
const supplierIdChange = (e : any) => {
|
||||||
|
queryF.value.supplier_id = e.id;
|
||||||
|
}
|
||||||
|
// 获取供应商
|
||||||
|
const getSupplierList = () => {
|
||||||
|
getSupplierSelect({}).then((res : any) => {
|
||||||
|
supplierList.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 获取系统状态栏的高度
|
// 获取系统状态栏的高度
|
||||||
let menuButtonInfo : any = {};
|
let menuButtonInfo : any = {};
|
||||||
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
||||||
@@ -96,8 +241,14 @@
|
|||||||
let data : Object = {
|
let data : Object = {
|
||||||
page: mescroll.num,
|
page: mescroll.num,
|
||||||
limit: mescroll.size,
|
limit: mescroll.size,
|
||||||
status: searchParams.value.status
|
batch_number:queryF.value.hasQuery===1?queryF.value.batch_number:'',
|
||||||
|
warehouse_id:queryF.value.hasQuery===1?queryF.value.warehouse_id:'',
|
||||||
|
product_name:queryF.value.hasQuery===1?queryF.value.product_name:'',
|
||||||
|
supplier_id:queryF.value.hasQuery===1?queryF.value.supplier_id:'',
|
||||||
};
|
};
|
||||||
|
// 重置 sumF 变量
|
||||||
|
sumF.value.total_quantity = 0;
|
||||||
|
sumF.value.total_amount = 0.00;
|
||||||
getWpRelationshipList(data).then((res : any) => {
|
getWpRelationshipList(data).then((res : any) => {
|
||||||
let newArr = res.data.data;
|
let newArr = res.data.data;
|
||||||
mescroll.endSuccess(newArr.length);
|
mescroll.endSuccess(newArr.length);
|
||||||
@@ -106,6 +257,11 @@
|
|||||||
relationshipList.value = []; //如果是第一页需手动制空列表
|
relationshipList.value = []; //如果是第一页需手动制空列表
|
||||||
}
|
}
|
||||||
relationshipList.value = relationshipList.value.concat(newArr);
|
relationshipList.value = relationshipList.value.concat(newArr);
|
||||||
|
relationshipList.value.forEach((item: any) => {
|
||||||
|
sumF.value.total_quantity += Number(item.inventory)
|
||||||
|
const amount = Number(sumF.value.total_amount) + Number(item.inventory) * Number(item.price)
|
||||||
|
sumF.value.total_amount = parseFloat(amount.toFixed(2))
|
||||||
|
})
|
||||||
listLoading.value = false;
|
listLoading.value = false;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
@@ -120,5 +276,42 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
|
.query-popup{
|
||||||
|
padding: 80rpx 30rpx 40rpx;
|
||||||
|
}
|
||||||
|
.query-btn{
|
||||||
|
margin-top: 60rpx;
|
||||||
|
display:flex;
|
||||||
|
}
|
||||||
|
.smmarie-wprelationship{
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
.smmarie-wprelationship .sum-total{
|
||||||
|
/* position: absolute;
|
||||||
|
top: -120rpx;
|
||||||
|
right: 10rpx; */
|
||||||
|
padding:10rpx;
|
||||||
|
width: 260rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background: #fff;
|
||||||
|
border: 2rpx solid #000;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
.sum-total .hd{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
/* .sum-total::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: -18rpx;
|
||||||
|
left: 86%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
border-width: 5px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #000 transparent transparent transparent;
|
||||||
|
} */
|
||||||
</style>
|
</style>
|
||||||
@@ -120,6 +120,7 @@
|
|||||||
bindAdminAccout(formData).then((res : any) => {
|
bindAdminAccout(formData).then((res : any) => {
|
||||||
if (info.value) {
|
if (info.value) {
|
||||||
memberStore.getMemberInfo()
|
memberStore.getMemberInfo()
|
||||||
|
memberStore.getUserBtnRole()
|
||||||
redirect({ url: '/addon/erp/pages/member/index', mode: 'redirectTo' })
|
redirect({ url: '/addon/erp/pages/member/index', mode: 'redirectTo' })
|
||||||
} else {
|
} else {
|
||||||
memberStore.setToken(res.data.token)
|
memberStore.setToken(res.data.token)
|
||||||
|
|||||||
527
src/addon/erp/pages/outbound/order/add.vue
Normal file
527
src/addon/erp/pages/outbound/order/add.vue
Normal file
@@ -0,0 +1,527 @@
|
|||||||
|
<template>
|
||||||
|
<view class="bg-[var(--page-bg-color)] min-h-[100vh] overflow-hidden form-edit" :style="themeColor()">
|
||||||
|
|
||||||
|
<up-form labelPosition="left" :model="formData" errorType='toast' :rules="rules" ref="formRef"
|
||||||
|
labelWidth="150rpx">
|
||||||
|
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
||||||
|
<view>
|
||||||
|
<up-form-item :label="'单据编号'" prop="code" required borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.code" disabled clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="'请输入单据编号'" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'食堂名称'" prop="customer_id" required borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.customer_id" :localdata="customerList" dataKey="name" dataValue="id"
|
||||||
|
:clear="false" placeholder="请选择食堂" @change="customerIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.customer_id" :options="customerList" dataKey="name" dataValue="id" placeholder="请选择食堂" :height="38" @change="customerIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'联系人'" prop="contact" borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.contact" clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="'请输入联系人'" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'联系电话'" prop="phone" borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.phone" clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="'请输入联系电话'" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'详细地址'" prop="address" borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.address" clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="'请输入详细地址'" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'供应商'" prop="supplier_id" borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.supplier_id" :localdata="supplierList" dataKey="name" dataValue="id"
|
||||||
|
:clear="false" placeholder="请选择供应商" @change="supplierIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.supplier_id" :options="supplierList" dataKey="name" dataValue="id" placeholder="请选择食堂" :height="38" @change="supplierIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'交货方式'" prop="type" required borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.type" :localdata="typeList" dataKey="name" dataValue="name"
|
||||||
|
:clear="false" placeholder="请选择交货方式" @change="updateType"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.type" :options="typeList" dataKey="name" dataValue="name" placeholder="请选择交货方式" :height="38" @change="updateType"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'仓库名称'" prop="type" required borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.warehouse_id" :localdata="warehouseList" dataKey="name" dataValue="id"
|
||||||
|
:clear="false" placeholder="请选择仓库" @change="warehouseIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.warehouse_id" :options="warehouseList" dataKey="name" dataValue="id" placeholder="请选择仓库" :height="38" @change="warehouseIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'送货日期'" prop="delivery_time" required borderBottom @click="deliveryTimeShow = true">
|
||||||
|
<up-datetime-picker hasInput :show="deliveryTimeShow" v-model="formData.delivery_time" mode="date" :placeholder="'请选择送货日期'" ></up-datetime-picker>
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'制单日期'" prop="billing_time" required borderBottom @click="billingTimeShow = true">
|
||||||
|
<up-datetime-picker hasInput :show="billingTimeShow" v-model="formData.billing_time" mode="date" :placeholder="'请选择制单日期'" ></up-datetime-picker>
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('remark')" prop="remark">
|
||||||
|
<u-textarea fontSize="28rpx" v-model="formData.remark" :placeholder="t('remarkPlaceholder')"
|
||||||
|
></u-textarea>
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<u-form-item :label="'图片'" prop="outbound_image" borderBottom>
|
||||||
|
<up-upload
|
||||||
|
:fileList="imageFileList"
|
||||||
|
@afterRead="afterRead"
|
||||||
|
multiple
|
||||||
|
:maxCount="5"
|
||||||
|
accept="image"
|
||||||
|
:capture="['camera']"
|
||||||
|
></up-upload>
|
||||||
|
</u-form-item>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mx-[var(--sidebar-m)] bg-[#ffffff] rounded mt-[20rpx]">
|
||||||
|
<view class="flex justify-between py-[10rpx] px-[20rpx] box-border border-0 border-b-1 border-color-[#dadbde] border-solid
|
||||||
|
">
|
||||||
|
<view class="text-base font-bold">{{t('Enter product')}}</view>
|
||||||
|
<view><u-button @click="goProductSelect" icon="plus" type="primary" :plain="true" size="mini"
|
||||||
|
:text="t('Add product')"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="formData.product.length > 0" class="sidebar-margin mt-[20rpx] pb-[20rpx] body-bottom">
|
||||||
|
<view class="mb-[15rpx]" v-for="(item, index) in formData.product" :key="index">
|
||||||
|
|
||||||
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
<view class="flex justify-between p-[20rpx]">
|
||||||
|
<view class="u-body-item-title u-line-2">{{item.product?.name}}</view>
|
||||||
|
<view><u-button :plain="true" type="error" @click="hanldeDelete(index)"
|
||||||
|
:text="t('delete')" size="mini"></u-button></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="body">
|
||||||
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productCode') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.code}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productTypeId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.productType?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productSpec') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.spec}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productUnitId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.productUnit?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '批次号' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.batch_number}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('inventory') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.inventory}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
<view class="content-center">
|
||||||
|
{{ t('sellPrice') }}:
|
||||||
|
</view>
|
||||||
|
<view class="ml-[20rpx]">
|
||||||
|
<u-number-box min="0" v-model="item.price" :integer="true"
|
||||||
|
inputWidth="80"></u-number-box>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
<view class="content-center">
|
||||||
|
{{ t('quantity') }}:
|
||||||
|
</view>
|
||||||
|
<view class="ml-[20rpx]">
|
||||||
|
<u-number-box min="1" v-model="item.num" :max="item.inventory"
|
||||||
|
:integer="true" inputWidth="80"></u-number-box>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('totalPrice') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{ item.num * item.price }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
|
<text class="text-sm text-color-[#848484]">暂未选择食材</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</up-form>
|
||||||
|
<view class="w-full footer">
|
||||||
|
<view
|
||||||
|
class="py-[var(--top-m)] px-[var(--sidebar-m)] footer w-full fixed bottom-0 left-0 right-0 box-border">
|
||||||
|
<button hover-class="none"
|
||||||
|
class="!bg-[var(--primary-color)] text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500"
|
||||||
|
@click="handSave" :disabled="loading" :class="{'opacity-50': loading}">{{t('save')}}</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, computed } from 'vue'
|
||||||
|
import { t } from '@/locale'
|
||||||
|
import { onLoad, onReady } from '@dcloudio/uni-app';
|
||||||
|
import { getWarehouseSelect,getCustomerSelect,getSupplierSelect} from '@/addon/erp/api/base';
|
||||||
|
import { addManual } from '@/addon/erp/api/sell';
|
||||||
|
import { generatedCode } from '@/addon/erp/utils/common';
|
||||||
|
import {uploadImage } from '@/app/api/system'
|
||||||
|
import { redirect } from '@/utils/common';
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
interface FileItem {
|
||||||
|
url: string;
|
||||||
|
status?: string;
|
||||||
|
message?: string;
|
||||||
|
}
|
||||||
|
const formRef : any = ref(null)
|
||||||
|
const loading = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
const rules = reactive({
|
||||||
|
// 'supplier_id': {
|
||||||
|
// required: true,
|
||||||
|
// message: t('supplierIdPlaceholder'),
|
||||||
|
// trigger: ['blur', 'change'],
|
||||||
|
// },
|
||||||
|
// 'warehouse_id': {
|
||||||
|
// required: true,
|
||||||
|
// message: t('warehouseIdPlaceholder'),
|
||||||
|
// trigger: ['blur', 'change'],
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
|
||||||
|
const imageFileList=ref<FileItem[]>([])
|
||||||
|
const formData = ref({
|
||||||
|
id: "",
|
||||||
|
code: generatedCode("CK"),
|
||||||
|
supplier_id: '',
|
||||||
|
supplier_name:"",
|
||||||
|
customer_id: "",
|
||||||
|
customer_name: "",
|
||||||
|
contact: "",
|
||||||
|
phone: "",
|
||||||
|
address: "",
|
||||||
|
type: "送货上门",
|
||||||
|
billing_time: dayjs().format('YYYY-MM-DD'),
|
||||||
|
delivery_time: dayjs().format('YYYY-MM-DD'),
|
||||||
|
remark: "",
|
||||||
|
product: [] as any[],
|
||||||
|
warehouse_id:"",
|
||||||
|
warehouse_name:"",
|
||||||
|
outbound_image:"",
|
||||||
|
total_amount:0,
|
||||||
|
total_num:0,
|
||||||
|
})
|
||||||
|
const typeList = ref([
|
||||||
|
{
|
||||||
|
name: '送货上门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '到店自提'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '邮寄配送'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
onReady(() => {
|
||||||
|
formRef.value.setRules(rules);
|
||||||
|
})
|
||||||
|
|
||||||
|
// 页面加载
|
||||||
|
onLoad((option : any) => {
|
||||||
|
getWarehouseList()
|
||||||
|
getCustomerList();
|
||||||
|
getSupplierList();
|
||||||
|
|
||||||
|
// 接收子页面传值
|
||||||
|
uni.$on('choose_product-out', res => {
|
||||||
|
const uniqueItems : any = {};
|
||||||
|
formData.value.product.forEach(item => {
|
||||||
|
uniqueItems[item.product.code] = item;
|
||||||
|
});
|
||||||
|
|
||||||
|
res.forEach((item:any) => {
|
||||||
|
if (!uniqueItems[item.product.code]) {
|
||||||
|
uniqueItems[item.product.code] = item;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const uniqueArray = Object.values(uniqueItems);
|
||||||
|
formData.value.product = uniqueArray.map((item:any) => {
|
||||||
|
item.num = 1;
|
||||||
|
item.unit=item!.product.productUnit ? item!.product.productUnit!.name : ''
|
||||||
|
item.available_inventory= Number(item.inventory) - Number(item.freeze)
|
||||||
|
item.price= item.price || 0
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const afterRead = async (event: any) => {
|
||||||
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists:FileItem[] = [].concat(event.file) ;
|
||||||
|
let fileListLen = imageFileList.value.length;
|
||||||
|
lists = lists.filter((item:FileItem) => item.url);
|
||||||
|
lists.map((item: any) => {
|
||||||
|
imageFileList.value.push({
|
||||||
|
url: item.url,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await uploadFilePromise(lists[i].url);
|
||||||
|
let item = imageFileList.value[fileListLen];
|
||||||
|
imageFileList.value.splice(fileListLen, 1, {
|
||||||
|
...item,
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: result as string,
|
||||||
|
});
|
||||||
|
fileListLen++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const uploadFilePromise = (url: any) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let a = uploadImage({
|
||||||
|
filePath:url,
|
||||||
|
name: 'file'
|
||||||
|
}).then((res:any)=>{
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(res.data.url as string);
|
||||||
|
}, 1000);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 供应商
|
||||||
|
*/
|
||||||
|
const supplierList = ref<any[]>([]);
|
||||||
|
const supplierIdChange = (e : any) => {
|
||||||
|
formData.value.supplier_id = e.id;
|
||||||
|
formData.value.supplier_name = e.name;
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validateField('supplier_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取供应商
|
||||||
|
const getSupplierList = () => {
|
||||||
|
getSupplierSelect({}).then((res : any) => {
|
||||||
|
supplierList.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 仓库
|
||||||
|
*/
|
||||||
|
const warehouseList = ref<any[]>([]);
|
||||||
|
const warehouseIdChange = (e : any) => {
|
||||||
|
formData.value.warehouse_id = e.id;
|
||||||
|
formData.value.warehouse_name = e.name;
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validateField('warehouse_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取仓库
|
||||||
|
const getWarehouseList = () => {
|
||||||
|
getWarehouseSelect({}).then((res : any) => {
|
||||||
|
warehouseList.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 食堂
|
||||||
|
*/
|
||||||
|
const customerList = ref<any[]>([]);
|
||||||
|
const customerIdChange = (e : any) => {
|
||||||
|
formData.value.customer_id = e.id;
|
||||||
|
formData.value.customer_name = e.name;
|
||||||
|
formData.value.contact = e.contact;
|
||||||
|
formData.value.phone = e.phone;
|
||||||
|
formData.value.address = e.address;
|
||||||
|
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validateField('customer_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取食堂
|
||||||
|
const getCustomerList = () => {
|
||||||
|
getCustomerSelect({}).then((res : any) => {
|
||||||
|
customerList.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const updateType = (e : any) => {
|
||||||
|
formData.value.type = e.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转到食材选择页
|
||||||
|
const goProductSelect = () => {
|
||||||
|
if (!formData.value.warehouse_id) {
|
||||||
|
uni.showToast({ icon: 'none', title: t('warehousePlaceholder') })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return redirect({
|
||||||
|
url: '/addon/erp/pages/product/product/out-product-select',
|
||||||
|
param: {
|
||||||
|
warehouse_id: formData.value.warehouse_id
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交货日期
|
||||||
|
*/
|
||||||
|
const deliveryTimeShow = ref(false);
|
||||||
|
const deliveryTimeConfirm = (e : any) => {
|
||||||
|
formData.value.delivery_time = uni.$u.date(e.value, 'yyyy-mm-dd');
|
||||||
|
deliveryTimeShow.value = false;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 制单日期
|
||||||
|
*/
|
||||||
|
const billingTimeShow = ref(false);
|
||||||
|
const billingTimeConfirm = (e : any) => {
|
||||||
|
formData.value.billing_time = uni.$u.date(e.value, 'yyyy-mm-dd');
|
||||||
|
billingTimeShow.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
const hanldeDelete = (index : number) => {
|
||||||
|
formData.value.product.splice(index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 总金额
|
||||||
|
const totalData = computed(() => {
|
||||||
|
let data = {
|
||||||
|
money: 0,
|
||||||
|
nums: 0,
|
||||||
|
};
|
||||||
|
for (let item of formData.value.product) {
|
||||||
|
let amount = Number(item.num) * Number(item.price);
|
||||||
|
data.money += amount;
|
||||||
|
data.nums += Number(item.num);
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 保存
|
||||||
|
const handSave = () => {
|
||||||
|
if (loading.value) return
|
||||||
|
|
||||||
|
if (!formData.value.customer_id) {
|
||||||
|
uni.showToast({ icon: 'none', title:'请选择食堂' })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!formData.value.type) {
|
||||||
|
uni.showToast({ icon: 'none', title: '请选择交货方式' })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!formData.value.delivery_time) {
|
||||||
|
uni.showToast({ icon: 'none', title: '请选择送货日期' })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!formData.value.billing_time) {
|
||||||
|
uni.showToast({ icon: 'none', title: '请选择制单日期' })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
loading.value = true
|
||||||
|
formData.value.total_num = totalData.value.nums;
|
||||||
|
formData.value.total_amount = totalData.value.money;
|
||||||
|
formData.value.billing_time = uni.$u.date(formData.value.billing_time, 'yyyy-mm-dd');
|
||||||
|
formData.value.delivery_time = uni.$u.date(formData.value.delivery_time, 'yyyy-mm-dd');
|
||||||
|
if(imageFileList.value.length > 0){
|
||||||
|
const imgUrls=imageFileList.value.map((item:any)=>item.url)
|
||||||
|
formData.value.outbound_image=imgUrls.join(',')
|
||||||
|
}
|
||||||
|
addManual(formData.value).then((res : any) => {
|
||||||
|
loading.value = false
|
||||||
|
if (res.code == 1) {
|
||||||
|
redirect({ url: '/addon/erp/pages/outbound/order/list' })
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
|
||||||
|
// console.log("formRef.value", formRef.value);
|
||||||
|
// console.log("formData.value", formData.value);
|
||||||
|
// return;
|
||||||
|
// formRef.value.validate().then(() => {
|
||||||
|
|
||||||
|
// }).catch(err => {
|
||||||
|
// console.log("err", err);
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.form-edit :deep(.up-form-item__body__left__content__label) {
|
||||||
|
font-size: 28rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-edit :deep(.up-form-item__body__right) {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
height: calc(100rpx + var(--top-m) + var(--top-m) + constant(safe-area-inset-bottom)) !important;
|
||||||
|
height: calc(100rpx + var(--top-m) + var(--top-m) + env(safe-area-inset-bottom)) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -6,12 +6,8 @@
|
|||||||
<view class="flex justify-between p-[20rpx]">
|
<view class="flex justify-between p-[20rpx]">
|
||||||
<view class="u-body-item-title u-line-2">{{t('code')}}:{{formData.code}}</view>
|
<view class="u-body-item-title u-line-2">{{t('code')}}:{{formData.code}}</view>
|
||||||
<view>
|
<view>
|
||||||
<up-tag v-if="formData.status == 0" :text="formData.status_text" type="warning" plain
|
<up-tag v-if="formData.storage_status == 5" :text="formData.storage_status_text" plain size="mini"></up-tag>
|
||||||
size="mini"></up-tag>
|
<up-tag v-if="formData.storage_status == 6" :text="formData.storage_status_text" type="success" plain
|
||||||
<up-tag v-if="formData.status == 1" :text="formData.status_text" type="error" plain
|
|
||||||
size="mini"></up-tag>
|
|
||||||
<up-tag v-if="formData.status == 2" :text="formData.status_text" plain size="mini"></up-tag>
|
|
||||||
<up-tag v-if="formData.status == 3" :text="formData.status_text" type="success" plain
|
|
||||||
size="mini"></up-tag>
|
size="mini"></up-tag>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -19,7 +15,7 @@
|
|||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="flex justify-start flex-col p-[20rpx]">
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('customerName') }}:<text
|
{{ t('customerId') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.customer?.name}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.customer?.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
@@ -32,11 +28,6 @@
|
|||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.phone}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.phone}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
|
||||||
{{ t('city') }}:<text
|
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.city}}</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('address') }}:<text
|
{{ t('address') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.address}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.address}}</text>
|
||||||
@@ -46,7 +37,7 @@
|
|||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.type}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.type}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('deliveryTime') }}:<text
|
{{ '送货日期' }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.delivery_time}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.delivery_time}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start items-center mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
@@ -57,6 +48,18 @@
|
|||||||
{{ t('remark') }}:<text
|
{{ t('remark') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.remark}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.remark}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '申领人' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.enter_name }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '出库人' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.store_name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('updateTime') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{formData.update_time}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -74,50 +77,74 @@
|
|||||||
<view class="bg-[#ffffff] rounded-10rpx">
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
<view class="flex justify-between p-[20rpx]">
|
<view class="flex justify-between p-[20rpx]">
|
||||||
<view class="u-body-item-title u-line-2">{{item.products?.name}}</view>
|
<view class="u-body-item-title u-line-2">{{item.product?.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="flex justify-start flex-col p-[20rpx]">
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productCode') }}:<text
|
{{ t('productCode') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.products?.code}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.code}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productSpec') }}:<text
|
{{ t('productSpec') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.products?.spec}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.spec}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('productUnitId') }}:<text
|
{{ t('productUnitId') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.unit}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.unit}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('warehouseName') }}:<text
|
批次号:
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.w_name}}</text>
|
<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.batch_number}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('deliveryQuantity') }}:
|
仓库名称:
|
||||||
|
<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.warehouse?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
出库数量:
|
||||||
<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.num}}</text>
|
<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.num}}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('sellPrice') }}:
|
单价(元):
|
||||||
<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.price}}</text>
|
<text class="ml-[20rpx] text-[var(--primary-color)]">{{item.price}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('totalPrice') }}:<text
|
{{ t('totalPrice') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{ item.subtotal }}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{ item.subtotal }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="bg-[#ffffff]">
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
图片
|
||||||
|
</view>
|
||||||
|
<view :class="formData.storage_status == 5 ?'pb-[120rpx]':''" v-if="imageArr.length >0">
|
||||||
|
<view class="img-p">
|
||||||
|
<up-image :show-loading="true" v-for="(imgItem,imgIndex) in imageArr" :key="imgIndex" :src="img(imgItem)" style="margin: 6rpx;" width="100rpx" height="100rpx" @click="previewImageClick(img(imgItem))"></up-image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
|
<text class="text-sm text-color-[#848484]">暂未上传图片</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="w-full footer" v-if="formData.storage_status == 5">
|
||||||
|
<view
|
||||||
|
class="py-[var(--top-m)] px-[var(--sidebar-m)] footer w-full fixed bottom-0 left-0 right-0 box-border">
|
||||||
|
<button hover-class="none"
|
||||||
|
class="!bg-[var(--primary-color)] text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500"
|
||||||
|
@click="handleOutWarehouse" >立即出库</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 立即出库模态框 -->
|
||||||
|
<up-modal :show="outWarehouseShow" @confirm="outWarehouseConfirm" showCancelButton @cancel="outWarehouseShow = false"
|
||||||
|
:title="'出库'" :content="'确定要出库该数据吗?'" ref="outWarehouseModal"></up-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -125,8 +152,8 @@
|
|||||||
import { ref, reactive, computed, onMounted } from 'vue'
|
import { ref, reactive, computed, onMounted } from 'vue'
|
||||||
import { t } from '@/locale'
|
import { t } from '@/locale'
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { getDeliveryInfo } from '@/addon/erp/api/sell';
|
import { getManualInfo ,takeOutOfStorage} from '@/addon/erp/api/sell';
|
||||||
|
import { img } from '@/utils/common'
|
||||||
const formRef : any = ref(null)
|
const formRef : any = ref(null)
|
||||||
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
@@ -143,21 +170,53 @@
|
|||||||
billing_time: '',
|
billing_time: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
create_time: '',
|
create_time: '',
|
||||||
status: '',
|
storage_status: '',
|
||||||
status_text: '',
|
storage_status_text: '',
|
||||||
productList: []
|
productList: [],
|
||||||
|
outbound_image:""
|
||||||
})
|
})
|
||||||
|
const outWarehouseShow = ref(false);
|
||||||
// 加载
|
// 加载
|
||||||
onLoad((data : any) => {
|
onLoad((data : any) => {
|
||||||
getInfo(data.id);
|
getInfo(data.id);
|
||||||
})
|
})
|
||||||
|
const imageArr=computed (()=>{
|
||||||
|
if(formData.outbound_image){
|
||||||
|
return formData.outbound_image.split(',')
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
})
|
||||||
const getInfo = async (id : number) => {
|
const getInfo = async (id : number) => {
|
||||||
const data = await (await getDeliveryInfo(id)).data;
|
const data = await (await getManualInfo(id)).data;
|
||||||
Object.assign(formData, data);
|
Object.assign(formData, data);
|
||||||
}
|
}
|
||||||
|
// 立即出库
|
||||||
|
const handleOutWarehouse= (item:any)=>{
|
||||||
|
outWarehouseShow.value=true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认立即出库
|
||||||
|
const outWarehouseConfirm = () => {
|
||||||
|
takeOutOfStorage(formData.id)
|
||||||
|
.then((res:any) => {
|
||||||
|
if(res.code ===1){
|
||||||
|
getInfo(formData.id);
|
||||||
|
outWarehouseShow.value = false;
|
||||||
|
}
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
const previewImageClick=(url:string)=>{
|
||||||
|
uni.previewImage({
|
||||||
|
current: 0,
|
||||||
|
urls:[url]
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
|
.img-p{
|
||||||
|
display: flex;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,23 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- 出库列表(已出库) -->
|
||||||
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
||||||
|
<!-- <up-subsection :list="statusList" mode="subsection" :current="subsectionCurrent" @change="handleChange" /> -->
|
||||||
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" height="auto" @up="getListFn"
|
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" height="auto" @up="getListFn"
|
||||||
:top="mescrollTop">
|
:top="mescrollTop">
|
||||||
<view class="sidebar-margin body-bottom" v-if="sellList.length">
|
<view class="sidebar-margin body-bottom" v-if="sellList.length">
|
||||||
<view class="mb-[15rpx]" v-for="(item,index) in sellList" :key="item.id">
|
<view class="mb-[15rpx]" v-for="(item,index) in sellList" :key="item.id">
|
||||||
|
|
||||||
<view class="bg-[#ffffff] rounded-10rpx"
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
@click="redirect({ url: '/addon/erp/pages/sell/sell/detail',param:{id: item.id} })">
|
|
||||||
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
<view class="flex justify-between p-[20rpx]">
|
<view class="flex justify-between p-[20rpx]">
|
||||||
<view class="u-body-item-title u-line-2">{{item.code}}</view>
|
<view class="u-body-item-title u-line-2">{{item.code}}</view>
|
||||||
<view>
|
<view>
|
||||||
<up-tag v-if="item.status == 0" :text="item.status_text" type="warning" plain
|
<up-tag v-if="item.storage_status == 5" :text="item.storage_status_text" plain size="mini"></up-tag>
|
||||||
size="mini"></up-tag>
|
<up-tag v-if="item.storage_status == 6" :text="item.storage_status_text" type="success" plain
|
||||||
<up-tag v-if="item.status == 1" :text="item.status_text" type="error" plain
|
|
||||||
size="mini"></up-tag>
|
|
||||||
<up-tag v-if="item.status == 2" :text="item.status_text" plain size="mini"></up-tag>
|
|
||||||
<up-tag v-if="item.status == 3" :text="item.status_text" type="success" plain
|
|
||||||
size="mini"></up-tag>
|
size="mini"></up-tag>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -37,38 +33,44 @@
|
|||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.customer?.phone}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.customer?.phone}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('deliveryTime') }}:<text
|
{{ '送货日期' }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.delivery_time}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.delivery_time}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('theoryMoney') }}:<text
|
{{ '申领人' }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.theory_money}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.enter_name }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('realMoney') }}:<text
|
{{ '出库人' }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.real_money}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.store_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
{{ t('updateTime') }}:<text
|
{{ t('updateTime') }}:<text
|
||||||
class="ml-[20rpx] text-[var(--primary-color)]">{{item.update_time}}</text>
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.update_time}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="operate">
|
||||||
|
<up-button v-if="item.storage_status == 5" size="mini" :customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'20rpx'}" type="primary" text="立即出库" @click="handleoutWarehouse(item)"></up-button>
|
||||||
|
<up-button size="mini" :customStyle="{padding: 0,width: '130rpx',height: '50rpx',marginRight:'10rpx'}" type="success" :text="'详情'" @click="redirect({ url: '/addon/erp/pages/outbound/order/detail',param:{id: item.id} })"></up-button>
|
||||||
|
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<mescroll-empty v-if="!sellList.length && !loading &&!listLoading"></mescroll-empty>
|
<mescroll-empty v-if="!sellList.length && !loading &&!listLoading"></mescroll-empty>
|
||||||
|
|
||||||
</mescroll-body>
|
</mescroll-body>
|
||||||
|
<!-- 立即出库模态框 -->
|
||||||
|
<up-modal :show="outWarehouseShow" @confirm="outWarehouseConfirm" showCancelButton @cancel="outWarehouseShow = false"
|
||||||
|
:title="'提示'" :content="'确定要出库该数据吗?'" ref="outWarehouseModal"></up-modal>
|
||||||
<loading-page :loading="loading"></loading-page>
|
<loading-page :loading="loading"></loading-page>
|
||||||
<view class="fixed bottom-4 right-4 z-2">
|
<!-- <view class="fixed bottom-4 right-4 z-2">
|
||||||
<up-button @click="redirect({ url: '/addon/erp/pages/sell/sell/add'})" type="primary" shape="circle"
|
<up-button @click="redirect({ url: '/addon/erp/pages/outbound/order/add'})" type="primary" shape="circle"
|
||||||
:customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
:customStyle="{borderRadius: '50%',padding: 0,width: '50px',height: '50px'}">
|
||||||
<u-icon size="30" color="#fff" name="plus-circle-fill"></u-icon>
|
<u-icon size="30" color="#fff" name="plus-circle-fill"></u-icon>
|
||||||
</up-button>
|
</up-button>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -80,15 +82,17 @@
|
|||||||
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
||||||
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
||||||
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
||||||
import { getSellList } from '@/addon/erp/api/sell';
|
import { getManualList,takeOutOfStorage} from '@/addon/erp/api/sell';
|
||||||
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
||||||
|
|
||||||
|
const outWarehouseId=ref('')
|
||||||
const show = ref(false);
|
const subsectionCurrent=ref(0)
|
||||||
|
const statusList = ref<any[]>(['待出库','已完成']);
|
||||||
|
const outWarehouseShow = ref(false);
|
||||||
const searchParams = ref<any>({
|
const searchParams = ref<any>({
|
||||||
status: undefined,
|
status: 6,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取系统状态栏的高度
|
// 获取系统状态栏的高度
|
||||||
@@ -97,7 +101,17 @@
|
|||||||
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
||||||
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
// #endif
|
// #endif
|
||||||
|
onLoad(() => {
|
||||||
|
// 获取状态
|
||||||
|
// getManualStatus().then((res:any) => {
|
||||||
|
// statusList.value = Object.values(res.data);
|
||||||
|
// });
|
||||||
|
})
|
||||||
|
// 分段器改变事件
|
||||||
|
const handleChange = (index : number) => {
|
||||||
|
searchParams.value.status = index === 0?5:6;
|
||||||
|
getMescroll().resetUpScroll();
|
||||||
|
}
|
||||||
const mescrollTop = "20rpx"
|
const mescrollTop = "20rpx"
|
||||||
|
|
||||||
const sellList = ref<Array<any>>([]),
|
const sellList = ref<Array<any>>([]),
|
||||||
@@ -117,9 +131,9 @@
|
|||||||
let data : Object = {
|
let data : Object = {
|
||||||
page: mescroll.num,
|
page: mescroll.num,
|
||||||
limit: mescroll.size,
|
limit: mescroll.size,
|
||||||
status: searchParams.value.status
|
storage_status: searchParams.value.status
|
||||||
};
|
};
|
||||||
getSellList(data).then((res : any) => {
|
getManualList(data).then((res : any) => {
|
||||||
let newArr = res.data.data;
|
let newArr = res.data.data;
|
||||||
mescroll.endSuccess(newArr.length);
|
mescroll.endSuccess(newArr.length);
|
||||||
//设置列表数据
|
//设置列表数据
|
||||||
@@ -139,7 +153,33 @@
|
|||||||
mescroll.endErr(); // 请求失败, 结束加载
|
mescroll.endErr(); // 请求失败, 结束加载
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 立即出库
|
||||||
|
const handleoutWarehouse= (item:any)=>{
|
||||||
|
outWarehouseShow.value=true
|
||||||
|
outWarehouseId.value=item.id
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认立即出库
|
||||||
|
const outWarehouseConfirm = () => {
|
||||||
|
if (outWarehouseId.value == '') {
|
||||||
|
uni.showToast({ icon: 'none', title: t("Invalid ID") });
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
takeOutOfStorage(outWarehouseId.value)
|
||||||
|
.then((res:any) => {
|
||||||
|
if(res.code ===1){
|
||||||
|
getMescroll().resetUpScroll();
|
||||||
|
outWarehouseId.value = '';
|
||||||
|
outWarehouseShow.value = false;
|
||||||
|
}
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
|
.operate{
|
||||||
|
display: flex;
|
||||||
|
justify-self: end;
|
||||||
|
padding-bottom:20rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
||||||
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
||||||
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
||||||
import { getSellList } from '@/addon/erp/api/sell';
|
import { getOutboundManualSelect } from '@/addon/erp/api/sell';
|
||||||
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
||||||
@@ -90,12 +90,12 @@
|
|||||||
|
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const searchParams = ref<any>({
|
const searchParams = ref<any>({
|
||||||
status: undefined,
|
id: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 页面加载
|
// 页面加载
|
||||||
onLoad((option : any) => {
|
onLoad((option : any) => {
|
||||||
searchParams.value.status = option.status ? option.status : undefined;
|
searchParams.value.id = option.id ? option.id : undefined;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -124,13 +124,9 @@
|
|||||||
|
|
||||||
const getListFn = (mescroll : mescrollStructure) => {
|
const getListFn = (mescroll : mescrollStructure) => {
|
||||||
listLoading.value = true;
|
listLoading.value = true;
|
||||||
let data : Object = {
|
getOutboundManualSelect(searchParams.value.id).then((res : any) => {
|
||||||
page: mescroll.num,
|
let newArr = res.data;
|
||||||
limit: mescroll.size,
|
console.log(res)
|
||||||
status: searchParams.value.status
|
|
||||||
};
|
|
||||||
getSellList(data).then((res : any) => {
|
|
||||||
let newArr = res.data.data;
|
|
||||||
mescroll.endSuccess(newArr.length);
|
mescroll.endSuccess(newArr.length);
|
||||||
//设置列表数据
|
//设置列表数据
|
||||||
if (mescroll.num == 1) {
|
if (mescroll.num == 1) {
|
||||||
119
src/addon/erp/pages/outbound/order/sell-select.vue
Normal file
119
src/addon/erp/pages/outbound/order/sell-select.vue
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
<template>
|
||||||
|
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
||||||
|
|
||||||
|
<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="{ use: false }" height="auto" @up="getListFn"
|
||||||
|
:top="mescrollTop">
|
||||||
|
<view class="sidebar-margin body-bottom" v-if="sellList.length">
|
||||||
|
<view class="mb-[15rpx]" v-for="(item,index) in sellList" :key="item.id">
|
||||||
|
<up-radio-group class="w-full" v-model="checkSellList" placement="column">
|
||||||
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
<view class="flex justify-between p-[20rpx]">
|
||||||
|
<view class="u-body-item-title u-line-2"><up-radio :name="item" :label="''"></up-radio>{{item.code}}</view>
|
||||||
|
<view>
|
||||||
|
<up-tag v-if="item.storage_status == 6" :text="item.storage_status_text" type="success" plain
|
||||||
|
size="mini"></up-tag>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="foot border-0 border-t-1 border-solid border-[#ddd]">
|
||||||
|
<view class="flex justify-start p-[20rpx]">
|
||||||
|
<up-radio :name="item" :label="t('choose')"></up-radio>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</up-radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<mescroll-empty v-if="!sellList.length && !loading &&!listLoading"></mescroll-empty>
|
||||||
|
|
||||||
|
</mescroll-body>
|
||||||
|
<loading-page :loading="loading"></loading-page>
|
||||||
|
<view class="sidebar-margin mt-[20rpx] body-bottom">
|
||||||
|
<u-button @click="onConfirm" type="primary" shape="circle" :text="t('confirmChoose')"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { t } from '@/locale';
|
||||||
|
import { redirect, pxToRpx } from '@/utils/common';
|
||||||
|
import MescrollBody from '@/components/mescroll/mescroll-body/mescroll-body.vue';
|
||||||
|
import MescrollEmpty from '@/components/mescroll/mescroll-empty/mescroll-empty.vue';
|
||||||
|
import useMescroll from '@/components/mescroll/hooks/useMescroll.js';
|
||||||
|
import { getOutboundManualSelect } from '@/addon/erp/api/sell';
|
||||||
|
import { onShow, onPageScroll, onReachBottom, onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
|
const { downCallback, mescrollInit, getMescroll } = useMescroll(onPageScroll, onReachBottom);
|
||||||
|
|
||||||
|
|
||||||
|
const show = ref(false);
|
||||||
|
const searchParams = ref<any>({
|
||||||
|
id: undefined,
|
||||||
|
});
|
||||||
|
|
||||||
|
// 页面加载
|
||||||
|
onLoad((option : any) => {
|
||||||
|
searchParams.value.id = option.id ? option.id : undefined;
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 获取系统状态栏的高度
|
||||||
|
let menuButtonInfo : any = {};
|
||||||
|
// 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
|
||||||
|
// #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
||||||
|
menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
const checkSellList = ref<any[]>([]);
|
||||||
|
|
||||||
|
const mescrollTop = "20rpx"
|
||||||
|
|
||||||
|
const sellList = ref<Array<any>>([]),
|
||||||
|
loading = ref<boolean>(true),
|
||||||
|
listLoading = ref<boolean>(true),
|
||||||
|
mescrollRef = ref(null);
|
||||||
|
|
||||||
|
interface mescrollStructure {
|
||||||
|
num : number,
|
||||||
|
size : number,
|
||||||
|
endSuccess : Function,
|
||||||
|
[propName : string] : any
|
||||||
|
}
|
||||||
|
|
||||||
|
const getListFn = (mescroll : mescrollStructure) => {
|
||||||
|
listLoading.value = true;
|
||||||
|
getOutboundManualSelect(searchParams.value.id).then((res : any) => {
|
||||||
|
let newArr = res.data;
|
||||||
|
mescroll.endSuccess(newArr.length);
|
||||||
|
//设置列表数据
|
||||||
|
if (mescroll.num == 1) {
|
||||||
|
sellList.value = []; //如果是第一页需手动制空列表
|
||||||
|
}
|
||||||
|
sellList.value = sellList.value.concat(newArr);
|
||||||
|
listLoading.value = false;
|
||||||
|
loading.value = false;
|
||||||
|
}).catch((err) => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
listLoading.value = false;
|
||||||
|
loading.value = false;
|
||||||
|
mescroll.endErr(); // 请求失败, 结束加载
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确认选择
|
||||||
|
const onConfirm = () => {
|
||||||
|
uni.$emit('choose_sell', checkSellList.value);
|
||||||
|
// 返回上一页
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
564
src/addon/erp/pages/outbound/outPending/add.vue
Normal file
564
src/addon/erp/pages/outbound/outPending/add.vue
Normal file
@@ -0,0 +1,564 @@
|
|||||||
|
<template>
|
||||||
|
<view class="bg-[var(--page-bg-color)] min-h-[100vh] overflow-hidden form-edit" :style="themeColor()">
|
||||||
|
|
||||||
|
<up-form labelPosition="left" :model="formData" errorType='toast' :rules="rules" ref="formRef"
|
||||||
|
labelWidth="150rpx">
|
||||||
|
<view class="sidebar-margin card-template mt-[var(--top-m)] py-[20rpx]">
|
||||||
|
<view>
|
||||||
|
<up-form-item :label="'单据编号'" prop="code" required borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.code" disabled clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="'请输入单据编号'" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'食堂名称'" prop="customer_id" required borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.customer_id" :localdata="customerList" dataKey="name" dataValue="id"
|
||||||
|
:clear="false" placeholder="请选择食堂" @change="customerIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.customer_id" :options="customerList" dataKey="name" dataValue="id" placeholder="请选择食堂" :height="38" @change="customerIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'联系人'" prop="contact" borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.contact" clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="'请输入联系人'" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'联系电话'" prop="phone" borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.phone" clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="'请输入联系电话'" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'详细地址'" prop="address" borderBottom>
|
||||||
|
<u-input fontSize="28rpx" v-model.trim="formData.address" clearable
|
||||||
|
placeholderStyle="color: #888" :placeholder="'请输入详细地址'" />
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'供应商'" prop="supplier_id" borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.supplier_id" :localdata="supplierList" dataKey="name" dataValue="id"
|
||||||
|
:clear="false" placeholder="请选择供应商" @change="supplierIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.supplier_id" :options="supplierList" dataKey="name" dataValue="id" placeholder="请选择供应商" :height="38" @change="supplierIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'交货方式'" prop="type" required borderBottom>
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.type" :localdata="typeList" dataKey="name" dataValue="name"
|
||||||
|
:clear="false" placeholder="请选择交货方式" @change="updateType"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.type" :options="typeList" dataKey="name" dataValue="name" :defaultVal="formData.type" placeholder="请选择交货方式" :height="38" @change="updateType"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'仓库名称'" prop="warehouse_id" required borderBottom>
|
||||||
|
<!-- <u-input fontSize="28rpx" v-model.trim="warehouseName" clearable
|
||||||
|
placeholderStyle="color: #888" disabled/> -->
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<zxz-uni-data-select v-model="formData.warehouse_id" :localdata="warehouseList" dataKey="name" dataValue="id"
|
||||||
|
:clear="false" placeholder="请选择仓库" @change="warehouseIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<wht-select v-model="formData.warehouse_id" :options="warehouseList" dataKey="name" dataValue="id" placeholder="请选择仓库" :height="38" @change="warehouseIdChange"/>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'送货日期'" prop="delivery_time" required borderBottom @click="deliveryTimeShow = true">
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<up-datetime-picker hasInput :show="deliveryTimeShow" v-model="formData.delivery_time" mode="date" :placeholder="'请选择送货日期'" @confirm="deliveryTimeConfirm" @cancel="deliveryTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<u-input fontSize="28rpx" v-model="formData.delivery_time" readonly
|
||||||
|
placeholderStyle="color: #888" placeholder="请选择送货日期" />
|
||||||
|
<up-datetime-picker :show="deliveryTimeShow" v-model="delivery_time_new" mode="date" :placeholder="'请选择送货日期'" @confirm="deliveryTimeConfirm" @cancel="deliveryTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="'制单日期'" prop="billing_time" required borderBottom @click="billingTimeShow = true">
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<up-datetime-picker hasInput :show="billingTimeShow" v-model="formData.billing_time" mode="date" :placeholder="'请选择制单日期'" @confirm="billingTimeConfirm" @cancel="billingTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<u-input fontSize="28rpx" v-model="formData.billing_time" readonly
|
||||||
|
placeholderStyle="color: #888" placeholder="请选择制单日期" />
|
||||||
|
<up-datetime-picker :show="billingTimeShow" v-model="billing_time_new" mode="date" :placeholder="'请选择制单日期'" @confirm="billingTimeConfirm" @cancel="billingTimeShow = false"></up-datetime-picker>
|
||||||
|
<!-- #endif -->
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<view class="mt-[16rpx]">
|
||||||
|
<up-form-item :label="t('remark')" prop="remark">
|
||||||
|
<u-textarea fontSize="28rpx" v-model="formData.remark" :placeholder="t('remarkPlaceholder')"
|
||||||
|
></u-textarea>
|
||||||
|
</up-form-item>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="mt-[16rpx]">
|
||||||
|
<u-form-item :label="'图片'" prop="outbound_image" borderBottom>
|
||||||
|
<up-upload
|
||||||
|
:fileList="imageFileList"
|
||||||
|
@afterRead="afterRead"
|
||||||
|
multiple
|
||||||
|
:maxCount="5"
|
||||||
|
accept="image"
|
||||||
|
:capture="['camera']"
|
||||||
|
></up-upload>
|
||||||
|
</u-form-item>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mx-[var(--sidebar-m)] bg-[#ffffff] rounded mt-[20rpx]">
|
||||||
|
<view class="flex justify-between py-[10rpx] px-[20rpx] box-border border-0 border-b-1 border-color-[#dadbde] border-solid
|
||||||
|
">
|
||||||
|
<view class="text-base font-bold">{{t('Enter product')}}</view>
|
||||||
|
<view><u-button @click="goProductSelect" icon="plus" type="primary" :plain="true" size="mini"
|
||||||
|
:text="t('Add product')"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="formData.product.length > 0" class="sidebar-margin mt-[20rpx] pb-[20rpx] body-bottom">
|
||||||
|
<view class="mb-[15rpx]" v-for="(item, index) in formData.product" :key="index">
|
||||||
|
|
||||||
|
<view class="bg-[#ffffff] rounded-10rpx">
|
||||||
|
<view class="head border-0 border-b-1 border-solid border-[#ddd]">
|
||||||
|
<view class="flex justify-between p-[20rpx]">
|
||||||
|
<view class="u-body-item-title u-line-2">{{item.product?.name}}</view>
|
||||||
|
<view><u-button :plain="true" type="error" @click="hanldeDelete(index)"
|
||||||
|
:text="t('delete')" size="mini"></u-button></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="body">
|
||||||
|
<view class="flex justify-start flex-col p-[20rpx]">
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productCode') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.code}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productTypeId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.productType?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productSpec') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.spec}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('productUnitId') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.product?.productUnit?.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '批次号' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.batch_number}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ '供应商' }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.supplier.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('inventory') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{item.inventory}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
<view class="content-center">
|
||||||
|
{{ t('sellPrice') }}:
|
||||||
|
</view>
|
||||||
|
<view class="ml-[20rpx]">
|
||||||
|
<u-number-box min="0" v-model="item.price" :integer="true"
|
||||||
|
inputWidth="80"></u-number-box>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
<view class="content-center">
|
||||||
|
{{ t('quantity') }}:
|
||||||
|
</view>
|
||||||
|
<view class="ml-[20rpx]">
|
||||||
|
<u-number-box min="1" v-model="item.num" :max="item.inventory"
|
||||||
|
:integer="true" inputWidth="80"></u-number-box>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start mb-[18rpx] text-[12px] text-[#6a6a6a]">
|
||||||
|
{{ t('totalPrice') }}:<text
|
||||||
|
class="ml-[20rpx] text-[var(--primary-color)]">{{ item.num * item.price }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="sidebar-margin mt-[20rpx] body-bottom text-center">
|
||||||
|
<text class="text-sm text-color-[#848484]">暂未选择食材</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</up-form>
|
||||||
|
<view class="w-full footer">
|
||||||
|
<view
|
||||||
|
class="py-[var(--top-m)] px-[var(--sidebar-m)] footer w-full fixed bottom-0 left-0 right-0 box-border">
|
||||||
|
<button hover-class="none"
|
||||||
|
class="!bg-[var(--primary-color)] text-[#fff] h-[80rpx] leading-[80rpx] rounded-[100rpx] text-[26rpx] font-500"
|
||||||
|
@click="handSave" :disabled="loading" :class="{'opacity-50': loading}">{{t('save')}}</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, computed } from 'vue'
|
||||||
|
import { t } from '@/locale'
|
||||||
|
import { onLoad, onReady } from '@dcloudio/uni-app';
|
||||||
|
import { getWarehouseSelect,getCustomerSelect,getSupplierSelect} from '@/addon/erp/api/base';
|
||||||
|
import { addManual } from '@/addon/erp/api/sell';
|
||||||
|
import { generatedCode } from '@/addon/erp/utils/common';
|
||||||
|
import {uploadImage } from '@/app/api/system'
|
||||||
|
import { redirect } from '@/utils/common';
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
import { checkBtnPermission } from '@/utils/auth';
|
||||||
|
import useMemberStore from '@/stores/member'
|
||||||
|
interface FileItem {
|
||||||
|
url: string;
|
||||||
|
status?: string;
|
||||||
|
message?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const memberStore = useMemberStore()
|
||||||
|
const formRef : any = ref(null)
|
||||||
|
const loading = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
const rules = reactive({
|
||||||
|
// 'supplier_id': {
|
||||||
|
// required: true,
|
||||||
|
// message: t('supplierIdPlaceholder'),
|
||||||
|
// trigger: ['blur', 'change'],
|
||||||
|
// },
|
||||||
|
// 'warehouse_id': {
|
||||||
|
// required: true,
|
||||||
|
// message: t('warehouseIdPlaceholder'),
|
||||||
|
// trigger: ['blur', 'change'],
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
|
||||||
|
const imageFileList=ref<FileItem[]>([])
|
||||||
|
const formData = ref({
|
||||||
|
id: "",
|
||||||
|
code: generatedCode("CK"),
|
||||||
|
supplier_id: '',
|
||||||
|
supplier_name:"",
|
||||||
|
customer_id: "",
|
||||||
|
customer_name: "",
|
||||||
|
contact: "",
|
||||||
|
phone: "",
|
||||||
|
address: "",
|
||||||
|
type: "送货上门",
|
||||||
|
billing_time: dayjs().format('YYYY-MM-DD'),
|
||||||
|
delivery_time: dayjs().format('YYYY-MM-DD'),
|
||||||
|
remark: "",
|
||||||
|
product: [] as any[],
|
||||||
|
warehouse_id:"",
|
||||||
|
warehouse_name:"",
|
||||||
|
outbound_image:"",
|
||||||
|
total_amount:0,
|
||||||
|
total_num:0,
|
||||||
|
})
|
||||||
|
const warehouseName=ref('')
|
||||||
|
const delivery_time_new=ref(dayjs().format('YYYY-MM-DD'))
|
||||||
|
const billing_time_new=ref(dayjs().format('YYYY-MM-DD'))
|
||||||
|
const typeList = ref([
|
||||||
|
{
|
||||||
|
name: '送货上门'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '到店自提'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '邮寄配送'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
onReady(() => {
|
||||||
|
formRef.value.setRules(rules);
|
||||||
|
})
|
||||||
|
|
||||||
|
// 页面加载
|
||||||
|
onLoad((option : any) => {
|
||||||
|
getWarehouseList()
|
||||||
|
getCustomerList();
|
||||||
|
getSupplierList();
|
||||||
|
|
||||||
|
// 接收子页面传值
|
||||||
|
uni.$on('choose_product-out', res => {
|
||||||
|
const uniqueItems : any = {};
|
||||||
|
formData.value.product.forEach(item => {
|
||||||
|
uniqueItems[item.product.code] = item;
|
||||||
|
});
|
||||||
|
|
||||||
|
res.forEach((item:any) => {
|
||||||
|
if (!uniqueItems[item.product.code]) {
|
||||||
|
uniqueItems[item.product.code] = item;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const uniqueArray = Object.values(uniqueItems);
|
||||||
|
formData.value.product = uniqueArray.map((item:any) => {
|
||||||
|
item.num = 1;
|
||||||
|
item.unit=item!.product.productUnit ? item!.product.productUnit!.name : ''
|
||||||
|
item.available_inventory= Number(item.inventory) - Number(item.freeze)
|
||||||
|
item.price= item.price || 0
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const afterRead = async (event: any) => {
|
||||||
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists:FileItem[] = [].concat(event.file) ;
|
||||||
|
let fileListLen = imageFileList.value.length;
|
||||||
|
lists = lists.filter((item:FileItem) => item.url);
|
||||||
|
lists.map((item: any) => {
|
||||||
|
imageFileList.value.push({
|
||||||
|
url: item.url,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
const result = await uploadFilePromise(lists[i].url);
|
||||||
|
let item = imageFileList.value[fileListLen];
|
||||||
|
imageFileList.value.splice(fileListLen, 1, {
|
||||||
|
...item,
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
url: result as string,
|
||||||
|
});
|
||||||
|
fileListLen++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const uploadFilePromise = (url: any) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let a = uploadImage({
|
||||||
|
filePath:url,
|
||||||
|
name: 'file'
|
||||||
|
}).then((res:any)=>{
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(res.data.url as string);
|
||||||
|
}, 1000);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 供应商
|
||||||
|
*/
|
||||||
|
const supplierList = ref<any[]>([]);
|
||||||
|
const supplierIdChange = (e : any) => {
|
||||||
|
formData.value.supplier_id = e.id;
|
||||||
|
formData.value.supplier_name = e.name;
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validateField('supplier_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取供应商
|
||||||
|
const getSupplierList = () => {
|
||||||
|
getSupplierSelect({}).then((res : any) => {
|
||||||
|
supplierList.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 仓库
|
||||||
|
*/
|
||||||
|
const warehouseList = ref<any[]>([]);
|
||||||
|
const warehouseIdChange = (e : any) => {
|
||||||
|
formData.value.warehouse_id = e.id;
|
||||||
|
formData.value.warehouse_name = e.name;
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validateField('warehouse_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取仓库
|
||||||
|
const getWarehouseList = () => {
|
||||||
|
getWarehouseSelect({}).then((res : any) => {
|
||||||
|
warehouseList.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 食堂
|
||||||
|
*/
|
||||||
|
const customerList = ref<any[]>([]);
|
||||||
|
const customerIdChange = (e : any) => {
|
||||||
|
formData.value.customer_id = e.id;
|
||||||
|
formData.value.customer_name = e.name;
|
||||||
|
formData.value.contact = e.contact;
|
||||||
|
formData.value.phone = e.phone;
|
||||||
|
formData.value.address = e.address;
|
||||||
|
formData.value.warehouse_id = e.warehouse_id;
|
||||||
|
if(e.warehouse_id){
|
||||||
|
const warehouseitem = warehouseList.value.find(item=>e.warehouse_id === item.id) || null
|
||||||
|
warehouseName.value = warehouseitem?.name || ''
|
||||||
|
}else{
|
||||||
|
warehouseName.value=''
|
||||||
|
}
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validateField('customer_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取食堂
|
||||||
|
const getCustomerList = () => {
|
||||||
|
getCustomerSelect({}).then((res : any) => {
|
||||||
|
customerList.value = res.data;
|
||||||
|
}).catch(err => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const updateType = (e : any) => {
|
||||||
|
formData.value.type = e.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转到食材选择页
|
||||||
|
const goProductSelect = () => {
|
||||||
|
if (!formData.value.warehouse_id) {
|
||||||
|
uni.showToast({ icon: 'none', title: t('warehousePlaceholder') })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return redirect({
|
||||||
|
url: '/addon/erp/pages/product/product/out-product-select',
|
||||||
|
param: {
|
||||||
|
warehouse_id: formData.value.warehouse_id
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交货日期
|
||||||
|
*/
|
||||||
|
const deliveryTimeShow = ref(false);
|
||||||
|
const deliveryTimeConfirm = (e : any) => {
|
||||||
|
formData.value.delivery_time = uni.$u.date(e.value, 'yyyy-mm-dd');
|
||||||
|
deliveryTimeShow.value = false;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 制单日期
|
||||||
|
*/
|
||||||
|
const billingTimeShow = ref(false);
|
||||||
|
const billingTimeConfirm = (e : any) => {
|
||||||
|
formData.value.billing_time = uni.$u.date(e.value, 'yyyy-mm-dd');
|
||||||
|
billingTimeShow.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
const hanldeDelete = (index : number) => {
|
||||||
|
formData.value.product.splice(index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 总金额
|
||||||
|
const totalData = computed(() => {
|
||||||
|
let data = {
|
||||||
|
money: 0,
|
||||||
|
nums: 0,
|
||||||
|
};
|
||||||
|
for (let item of formData.value.product) {
|
||||||
|
let amount = Number(item.num) * Number(item.price);
|
||||||
|
data.money += amount;
|
||||||
|
data.nums += Number(item.num);
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 保存
|
||||||
|
const handSave = async() => {
|
||||||
|
const hasPermission = await checkBtnPermission(memberStore.btnPermission, 'erp_manual_outbound_add')
|
||||||
|
if (!hasPermission) return false
|
||||||
|
if (loading.value) return
|
||||||
|
if (!formData.value.customer_id) {
|
||||||
|
uni.showToast({ icon: 'none', title:'请选择食堂' })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!formData.value.warehouse_id) {
|
||||||
|
uni.showToast({ icon: 'none', title:'请选择仓库' })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!formData.value.delivery_time) {
|
||||||
|
uni.showToast({ icon: 'none', title: '请选择送货日期' })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!formData.value.type) {
|
||||||
|
uni.showToast({ icon: 'none', title: '请选择交货方式' })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!formData.value.billing_time) {
|
||||||
|
uni.showToast({ icon: 'none', title: '请选择制单日期' })
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
loading.value = true
|
||||||
|
formData.value.total_num = totalData.value.nums;
|
||||||
|
formData.value.total_amount = totalData.value.money;
|
||||||
|
formData.value.billing_time = uni.$u.date(formData.value.billing_time, 'yyyy-mm-dd');
|
||||||
|
formData.value.delivery_time = uni.$u.date(formData.value.delivery_time, 'yyyy-mm-dd');
|
||||||
|
if(imageFileList.value.length > 0){
|
||||||
|
const imgUrls=imageFileList.value.map((item:any)=>item.url)
|
||||||
|
formData.value.outbound_image=imgUrls.join(',')
|
||||||
|
}
|
||||||
|
addManual(formData.value).then((res : any) => {
|
||||||
|
loading.value = false
|
||||||
|
if (res.code == 1) {
|
||||||
|
redirect({ url: '/addon/erp/pages/outbound/outPending/list' })
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
// 如果是4001,没有绑定企业账号,强制跳转绑定
|
||||||
|
if (err.code == 4001) {
|
||||||
|
redirect({ url: '/addon/erp/pages/member/bind' })
|
||||||
|
}
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
|
||||||
|
// console.log("formRef.value", formRef.value);
|
||||||
|
// console.log("formData.value", formData.value);
|
||||||
|
// return;
|
||||||
|
// formRef.value.validate().then(() => {
|
||||||
|
|
||||||
|
// }).catch(err => {
|
||||||
|
// console.log("err", err);
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.form-edit :deep(.up-form-item__body__left__content__label) {
|
||||||
|
font-size: 28rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-edit :deep(.up-form-item__body__right) {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
height: calc(100rpx + var(--top-m) + var(--top-m) + constant(safe-area-inset-bottom)) !important;
|
||||||
|
height: calc(100rpx + var(--top-m) + var(--top-m) + env(safe-area-inset-bottom)) !important;
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user