wangfukang 3 years ago
parent
commit
6a3c01ca71
  1. 10
      pages/billing/changeGoods1.vue
  2. 4
      pages/index/addHangOrder.vue
  3. 22
      pages/index/downStearmList.vue
  4. 4
      pages/index/index.vue
  5. 16
      pages/index/order.vue
  6. 2
      pages/index/orderDetail.vue
  7. 10
      pages/index/shareStyle.vue
  8. 61
      pages/index/waitStorage.vue
  9. 2
      pages/index/waitStorageDetail.vue
  10. 4
      pages/inventory/goodsList1.vue
  11. 30
      pages/login/register.vue

10
pages/billing/changeGoods1.vue

@ -15,7 +15,7 @@
<view class="content-right">
<view class="right-box" v-for="(item,index) in shopList" :key="index" @tap="toggle('bottom',item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0" @tap.stop="clickMask(item)"></view>
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask"></view>
<view class="box-left">
<img :src="item.productPicture" alt="">
</view>
@ -419,13 +419,9 @@
this.getShareList()
},
//未入库遮罩
clickMask(item) {
let title = ''
if (item.delFlag == 0) {
title = '请将商品上架后再操作!'
}
clickMask() {
uni.showToast({
title: title,
title: '请将商品上架或入库后再操作!',
icon: 'none'
})
},

4
pages/index/addHangOrder.vue

@ -498,8 +498,8 @@
getById(id) {
this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => {
if (res.code == 200) {
if(res.result.delFlag ==0){
this.tui.toast("请将商品上架后再操作!")
if(res.result.delFlag ==0 || res.result.purchasePrice==null || res.result.inStorageStatus == 0){
this.tui.toast("请将商品上架或入库后再操作!")
return
}
this.goodsDetail = res.result;

22
pages/index/downStearmList.vue

@ -14,22 +14,14 @@
<view class="box-right-name">{{item.productName == null ?'暂无':item.productName}}</view>
<view class="box-right-num">{{item.productSn == null ?'暂无':item.productSn}}</view>
<view class="box-right-price">
<!-- <view class="price-box">
<text>{{item.purchasePrice}}</text>
<text>采购价</text>
</view>
<view class="price-box">
<text>{{item.wholesalePrice}}</text>
<view class="price-box" v-if="priceType == 1">
<text>{{item.wholesalePrice == null ?'暂无':item.wholesalePrice}}</text>
<text>批发价</text>
</view> -->
<view class="price-box">
</view>
<view class="price-box" v-if="priceType == 0">
<text>{{item.price == null ?'暂无':item.price}}</text>
<text>零售价</text>
</view>
<!-- <view class="price-box">
<text>{{item.stockCount}}</text>
<text>库存</text>
</view> -->
</view>
</view>
</view>
@ -185,7 +177,8 @@
searchName: '', //搜索框输入值
shopId: '', //店铺id,
checkbox: [], //需要分享的商品id
temporaryNum: 0,
temporaryNum: 0,
priceType:'',
goodsDetail: [],
attrNameList: [],
temporaryList: [],
@ -579,7 +572,8 @@
pageSize: '10'
}, false, true).then((res) => {
if (res.code == 200) {
this.shopList = res.result.records
this.shopList = res.result.records
this.priceType = res.result.priceType
this.shopId = res.result.records[0].shopId
} else {
this.tui.toast(res.message)

4
pages/index/index.vue

@ -16,7 +16,9 @@
class="red-circle">{{waitCount.waitAddProductCount > 99 ? '99+' :waitCount.waitAddProductCount}}</text>
</view>
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/addHangOrder')">
<text>挂单</text>
<text>挂单</text>
<text v-if="waitCount.registrationCount > 0"
class="red-circle">{{waitCount.registrationCount > 99 ? '99+' :waitCount.registrationCount}}</text>
</view>
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/shareStyle')">
<text>推款</text>

16
pages/index/order.vue

@ -49,7 +49,6 @@
},
onShow(){
// this.getMonth();
this.getOrderInfoList()
},
onReachBottom() {
@ -120,21 +119,6 @@
uni.switchTab({
url: '/pages/inventory/goodsList1'
})
},
//获取当月1日到当前时间
getMonth() {
//获取新的时间
let date = new Date()
//获取当前时间的年份转为字符串
let year = date.getFullYear().toString() //'年'
//获取月份,由于月份从0开始,此处要加1,判断是否小于10,如果是在字符串前面拼接'0'
let month = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1).toString():(date.getMonth()+1).toString() //'月'
//获取天,判断是否小于10,如果是在字符串前面拼接'0'
let da = date.getDate() < 10 ? '0'+date.getDate().toString():date.getDate().toString() //'日'
//字符串拼接,开始时间,结束时间
let end = year + '-' + month + '-' + da //当天
let beg = year + '-' + month + '-01' //当月第一天
this.range = [beg,end]
}
}
}

2
pages/index/orderDetail.vue

@ -369,7 +369,7 @@
strCmd += blesdk.addCPCLSETMAG(2, 2)
strCmd += blesdk.addCPCLText('0', '650', '24', '0', 0, '——————————————————————————————')
strCmd += blesdk.addCPCLText('50', '730', '24', '0', 0, '店铺:'+this.sales.shopName)
strCmd += blesdk.addCPCLText('50', '810', '24', '0', 0, '13521030702')
strCmd += blesdk.addCPCLText('50', '810', '24', '0', 0, this.sales.createByPhone)
strCmd += blesdk.addCPCLText('50', '890', '24', '0', 0, '地址:'+this.shopData.shopAddress)
strCmd += blesdk.addCPCLLocation(0);
strCmd += blesdk.addCPCLPrint();

10
pages/index/shareStyle.vue

@ -14,7 +14,7 @@
<view class="content-right">
<view class="right-box" v-for="(item,index) in goodsList" :key="index">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0" @tap.stop="clickMask(item)"></view>
<view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask"></view>
<view class="box-left">
<img :src="item.productPicture" alt="">
</view>
@ -221,13 +221,9 @@
this.getShareList()
},
//未入库遮罩
clickMask(item) {
let title = ''
if (item.delFlag == 0) {
title = '请将商品上架后再操作!'
}
clickMask() {
uni.showToast({
title: title,
title: '请将商品上架或入库后再操作!',
icon: 'none'
})
},

61
pages/index/waitStorage.vue

@ -1,7 +1,8 @@
<template>
<view>
<view class="search">
<u-search placeholder="输入供应商/商品名称/货号查询" v-model="keyword" @search="searchList" bg-color="#fff"
<view class="search" v-if="inStorageStatus != 0">
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" @change="getList" type="daterange" />
<u-search placeholder="输入供应商/商品名称/货号查询" v-model="searchStr" @search="getList" bg-color="#fff"
:show-action="false" border-color="#afd9ee"></u-search>
</view>
<u-alert description="点击可跳转至入库单" type="primary"></u-alert>
@ -46,7 +47,7 @@
},
data() {
return {
keyword: '',
searchStr: '',
list: [],
inStorageStatus: '',
supplierName: '',
@ -55,7 +56,8 @@
type: '',
pages: 1,
pageNum:1,
status: 'loadmore'
status: 'loadmore',
range:[]
}
},
onShow(){
@ -71,39 +73,42 @@
this.pageNum += 1;
this.getList();
},
methods: {
getList() {
this.tui.request("/app/purchase/list", "POST", {
inStorageStatus: this.inStorageStatus,
supplierName: this.supplierName,
startDate: this.startDate,
endDate: this.endDate,
pageNum:this.pageNum,
pageSize:10,
}, false, false).then((res) => {
methods: {
searchList() {
this.pages = 1;
this.list = [];
this.getList()
},
getList() {
var url,data
if(this.inStorageStatus == 0){
url = "/app/purchase/list";
data = {
inStorageStatus: this.inStorageStatus
}
}else{
url = "/app/purchase/getPurchaseList";
data = {
inStorageStatus: this.inStorageStatus,
supplierName: this.supplierName,
startDate: this.range[0],
endDate: this.range[1],
pageNum:this.pageNum,
pageSize:10,
}
}
this.tui.request(url, "POST", data, false, false).then((res) => {
if (res.code == 200) {
this.pages = res.result.pages
if (this.pages == 1) {
this.list = res.result.records
} else {
this.list = [...this.list, ...res.result.records]
}
} else {
this.tui.toast(res.message)
}
})
},
//搜索
searchList() {
this.tui.request("/app/purchase/getPurchaseList", "POST", {
searchStr:this.keyword
}, false, false).then((res) => {
if (res.code == 200) {
this.list = res.result
}
} else {
this.tui.toast(res.message)
}
})
})
},
returnPrice(item) {
uni.navigateTo({

2
pages/index/waitStorageDetail.vue

@ -254,7 +254,7 @@
that.goodsList.forEach(function(value, key) {
that.shouldPay += value.price
})
that.noPay = that.shouldPay
}
},
}

4
pages/inventory/goodsList1.vue

@ -790,8 +790,8 @@
getById(id) {
this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => {
if (res.code == 200) {
if (res.result.delFlag == 0) {
this.tui.toast("请将商品上架后再操作!")
if (res.result.delFlag ==0 || res.result.purchasePrice==null || res.result.inStorageStatus == 0) {
this.tui.toast("请将商品上架或入库后再操作!")
return
}
this.goodsDetail = res.result;

30
pages/login/register.vue

@ -16,6 +16,12 @@
<uni-forms-item label="手机号" name="mobile" required>
<uni-easyinput type="digit" v-model="formData.mobile" placeholder="请输入手机号" trim="all" />
</uni-forms-item>
<uni-forms-item label="登录密码" name="passWord" required>
<uni-easyinput type="password" v-model="formData.passWord" placeholder="请输入密码" trim="all" />
</uni-forms-item>
<uni-forms-item label="确认密码" name="psd" required>
<uni-easyinput type="password" v-model="formData.psd" placeholder="请再次输入密码" trim="all" />
</uni-forms-item>
<uni-forms-item label="验证码" name="code" required>
<uni-easyinput type="digit" v-model="formData.code" placeholder="请输入验证码" trim="all" />
<button class="button" size="mini" type="default" @click="sendLoginSms" :disabled="choose" :class="choose == false ? 'hasChosen':'notChosen'">
@ -40,7 +46,9 @@
mobile: '',
code: '',
LoginSms:'',
nickname:''
nickname:'',
passWord:'',
psd:''
},
rules: {
// 对name字段进行必填验证
@ -73,6 +81,18 @@
required: true,
errorMessage: '请填写验证码',
}, ],
},
passWord: {
rules: [{
required: true,
errorMessage: '请填写密码',
}, ],
},
psd: {
rules: [{
required: true,
errorMessage: '请填写密码',
}, ],
},
},
choose:false,
@ -119,7 +139,13 @@
setTimeout(() => { this.setTime() },1000)
},
// 触发提交表单
submit() {
submit() {
if(this.formData.passWord != this.formData.psd){
uni.showToast({
title: "两次密码输入不一致!",
icon: 'none'
})
}
this.$refs.form.validate().then(res => {
this.tui.request("/auth/shopRegister", "post", res, false, true).then((res1) => {
if (res1.code == 200) {

Loading…
Cancel
Save