wangfukang 3 years ago
parent
commit
9ddd17d9c7
  1. BIN
      pages/.DS_Store
  2. BIN
      pages/billing/.DS_Store
  3. 241
      pages/billing/changeGoods1.vue
  4. 20
      pages/index/addHangOrder.vue
  5. 23
      pages/index/downStearmList.vue
  6. 13
      pages/index/shareStyle.vue
  7. 3
      pages/index/waitStorageDetail.vue
  8. 9
      pages/inventory/addGoods.vue
  9. 2
      pages/inventory/addinventory.vue
  10. 28
      pages/inventory/changeGoods1.vue
  11. 4
      pages/inventory/gategory.vue
  12. 1
      pages/inventory/gategoryLow.vue
  13. 66
      pages/inventory/goodsList1.vue
  14. 7
      pages/inventory/inventory.vue
  15. 3
      pages/inventory/inventoryDetail.vue
  16. 14
      pages/login/login.vue
  17. 4
      pages/login/register.vue
  18. 2
      pages/other/custom.vue
  19. 246
      pages/other/logistics.vue
  20. 18
      pages/other/logisticsDetail.vue
  21. 1
      pages/rebate/detail.vue
  22. 3
      pages/rebate/rebate.vue
  23. 2
      pages/rebate/withdrawal.vue
  24. 7
      pages/staff/addStaff/addStaff.vue
  25. 5
      pages/staff/clock/clock.vue
  26. 5
      pages/staff/signRule/signRule.vue

BIN
pages/.DS_Store

Binary file not shown.

BIN
pages/billing/.DS_Store

Binary file not shown.

241
pages/billing/changeGoods1.vue

@ -63,8 +63,7 @@
<view class="popup-content">
<view class="popup-title">
<view class="popup-title-left">
<img :src="goodsDetail.productPicture"
alt="">
<img :src="goodsDetail.productPicture" alt="">
</view>
<view class="popup-title-right">
<view class="popup-title-right-box" style="color: #088FEB;">{{goodsDetail.productName}}
@ -87,11 +86,13 @@
</view>
</li>
</ul>
<view class="checkList" v-for="(item,index) in temporaryList" :key="index">
<view class="checkList-box">
{{item.name}}
<view>
<view class="checkList" v-for="(item,index) in temporaryList" :key="index">
<view class="checkList-box">
{{item.name}}
</view>
<uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" />
</view>
<uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" />
</view>
</view>
<view class="popup-bottom" v-for="(item,index) in temporaryList" :key="index">
@ -112,8 +113,7 @@
<view v-for="(item,index) in carList" :key="index" style="position: relative;">
<view class="popup-title">
<view class="popup-title-left">
<img :src="item.productPicture"
alt="">
<img :src="item.productPicture" alt="">
</view>
<view class="popup-title-right">
<view class="popup-title-right-box" style="color: #088FEB;">{{item.productName}}</view>
@ -135,7 +135,8 @@
<view class="checkList-box">
{{item1.attributeList | sliceMsg}}
</view>
<uni-number-box max="100000" v-model="item1.productCount" @change="carChange($event,index,index1)" />
<uni-number-box max="100000" v-model="item1.productCount"
@change="carChange($event,index,index1)" />
</view>
</view>
</view>
@ -184,25 +185,25 @@
carType: 0,
type: ''
}
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name += newObj[as] + '/'
}
}
return name;
},
maxNum(val) {
if (val >= 10) {
return 10
} else if (val < 0) {
return 0
}
}
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name += newObj[as] + '/'
}
}
return name;
},
maxNum(val) {
if (val >= 10) {
return 10
} else if (val < 0) {
return 0
}
}
},
onLoad() {
this.getGategoryList()
@ -272,15 +273,14 @@
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} else {
for (var i = 0; i < this.temporaryList.length; i++) {
console.log(this.temporaryList[i].name.indexOf(this.attributeList.name))
for (var i = 0; i < this.temporaryList.length; i++) {
if (this.temporaryList[i].name.indexOf(this.attributeList.name) != -1) {
return
}else{
if (this.temporaryList.length == (i + 1)) {
this.temporaryList.push(this.attributeList);
return
}
} else {
if (this.temporaryList.length == (i + 1)) {
this.temporaryList.push(this.attributeList);
return
}
}
}
@ -315,36 +315,31 @@
pageSize: '10'
}, false, false).then((res) => {
if (res.code == 200) {
this.shopList = res.result.records
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
change(){
},
change() {
},
//
carChange(e,index,index1) {
console.log(this.carList)
this.carNum = 0
for (let i = 0; i < this.carList.length; i++) {
this.carList[i].num = 0
for (let m = 0; m < this.carList[i].saleDetailQueryDTO.length; m++) {
this.carList[i].num += this.carList[i].saleDetailQueryDTO[m].productCount
}
this.carNum += this.carList[i].num
carChange(e, index, index1) {
this.carNum = 0
for (let i = 0; i < this.carList.length; i++) {
this.carList[i].num = 0
for (let m = 0; m < this.carList[i].saleDetailQueryDTO.length; m++) {
this.carList[i].num += this.carList[i].saleDetailQueryDTO[m].productCount
}
this.carNum += this.carList[i].num
}
},
//弹出购物车或者商品规格选择弹窗
toggle(type, item) {
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
if (type == 'carPopup') {
this.oldList = this.carList
console.log(this.carList)
// this.newFun()
this.oldList = this.carList
this.carNum = 0
for (let i = 0; i < this.carList.length; i++) {
this.carNum += this.carList[i].num
@ -359,21 +354,19 @@
},
//选择商品查询商品规格
checkGoods(item) {
this.goodsDetail = item;
this.temporaryList = []
this.columns = []
this.keyList = []
console.log(this.temporaryList)
console.log(this.carList)
if(this.carList != ''){
this.zNum = 0
for(let i=0;i<this.carList.length;i++){
if(item.id == this.carList[i].id){
this.zNum = this.carList[i].num
this.temporaryList = this.carList[i].saleDetailQueryDTO
}
}
this.goodsDetail = item;
this.temporaryList = []
this.columns = []
this.keyList = []
if (this.carList != '') {
this.zNum = 0
for (let i = 0; i < this.carList.length; i++) {
if (item.id == this.carList[i].id) {
this.zNum = this.carList[i].num
this.temporaryList = this.carList[i].saleDetailQueryDTO
}
}
}
this.tui.request("/app/productAttribute/selectAttributeAndValueByCategoryId", "POST", {
categoryId: this.goodsDetail.categoryId
@ -453,30 +446,30 @@
saleDetailQueryDTO1: [],
wholesalePrice: this.goodsDetail.wholesalePrice,
lsprice: this.goodsDetail.price
}
if(this.carList.length == 0){
this.carList.push(data)
}else{
let aa = true;
for(let i = 0; i < this.carList.length; i++){
if(this.carList[i].id == data.id){
this.carList[i] = data
aa = false
}
}
if(aa){
this.carList.push(data)
}
}
if (this.carList.length == 0) {
this.carList.push(data)
} else {
let aa = true;
for (let i = 0; i < this.carList.length; i++) {
if (this.carList[i].id == data.id) {
this.carList[i] = data
aa = false
}
}
if (aa) {
this.carList.push(data)
}
}
for (let i = 0; i < this.carList.length; i++) {
this.carList[i].num = 0
for (let m = 0; m < this.carList[i].saleDetailQueryDTO.length; m++) {
this.carList[i].num += this.carList[i].saleDetailQueryDTO[m].productCount
}
}
this.temporaryList = []
this.purchasePrice = ''
this.zPrice = ''
@ -496,48 +489,49 @@
uni.showModal({
title: "提示",
content: "确定删除此条商品吗?",
success: function(res) {
if (res.confirm) {
for(let i=0;i<that.carList.length;i++){
if(that.carList[i].id == item.id){
that.carNum -= that.carList[i].num
that.carList.splice(i, 1)
}
}
that.carType = that.carList.length
}
success: function(res) {
if (res.confirm) {
for (let i = 0; i < that.carList.length; i++) {
if (that.carList[i].id == item.id) {
that.carNum -= that.carList[i].num
that.carList.splice(i, 1)
}
}
that.carType = that.carList.length
}
that.$forceUpdate()
}
})
},
//删除商品下的某一个规格
delShopSpec(index,index1) {
var that = this;
uni.showModal({
title: "提示",
content: "确定删除此条商品吗?",
success: function(res) {
if (res.confirm) {
for(let i=0;i<that.carList.length;i++){
for(let m=0;m<that.carList[i].saleDetailQueryDTO.length;m++){
if(that.carList[i].id == index){
if(that.carList[i].saleDetailQueryDTO[m].attributeList == index1){
that.carList[i].num -= that.carList[i].saleDetailQueryDTO[m].productCount
that.carNum -= that.carList[i].saleDetailQueryDTO[m].productCount
that.carList[i].saleDetailQueryDTO.splice(m, 1)
continue;
}
}
}
if(that.carList[i].saleDetailQueryDTO.length == 0){
that.carList.splice(i, 1)
}
}
that.carType = that.carList.length
}
that.$forceUpdate()
}
delShopSpec(index, index1) {
var that = this;
uni.showModal({
title: "提示",
content: "确定删除此条商品吗?",
success: function(res) {
if (res.confirm) {
for (let i = 0; i < that.carList.length; i++) {
for (let m = 0; m < that.carList[i].saleDetailQueryDTO.length; m++) {
if (that.carList[i].id == index) {
if (that.carList[i].saleDetailQueryDTO[m].attributeList == index1) {
that.carList[i].num -= that.carList[i].saleDetailQueryDTO[m]
.productCount
that.carNum -= that.carList[i].saleDetailQueryDTO[m].productCount
that.carList[i].saleDetailQueryDTO.splice(m, 1)
continue;
}
}
}
if (that.carList[i].saleDetailQueryDTO.length == 0) {
that.carList.splice(i, 1)
}
}
that.carType = that.carList.length
}
that.$forceUpdate()
}
})
},
//选择是零售价还是批发价
@ -576,6 +570,8 @@
padding: 15px;
height: 1200rpx;
background-color: #fff;
margin-bottom: 30rpx;
overflow: scroll;
}
.popup-pay-content {
@ -728,7 +724,6 @@
}
.content-right {
// width: 550rpx;
flex: 1;
overflow-y: scroll;
}

20
pages/index/addHangOrder.vue

@ -618,7 +618,6 @@
},
//带参数跳转到开单页
goSaleGoods(item) {
console.log(item)
if(item){
let dataList = []
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
@ -640,7 +639,6 @@
obj.createByName = item.createByName
dataList.push(obj)
}
console.log(dataList)
uni.setStorageSync('carList1', JSON.stringify(dataList))
uni.setStorageSync('khName', '')
}
@ -848,16 +846,14 @@
white-space: nowrap;
}
.btn-list {
// flex: 1;
}
.shop-popup-content {
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
.shop-popup-content {
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
margin-bottom: 30rpx;
overflow: scroll;
}
.shop-popup-title {

23
pages/index/downStearmList.vue

@ -6,7 +6,7 @@
</view>
<view class="content-box">
<view class="content-right">
<view class="right-box" v-for="item in shopList" :key="item" @tap="toggle('bottom',item)">
<view class="right-box" v-for="(item,index) in shopList" :key="index" @tap="toggle('bottom',item)">
<view class="box-left">
<img :src="item.productPicture" alt="">
</view>
@ -101,7 +101,6 @@
</view>
<!-- 弹出输入框 -->
<uni-popup ref="inputDialog" background-color="#fff">
<!-- 省市区选择 show:是否显示 @sureSelectArea:确认事件 @hideShow:隐藏事件-->
<cc-selectDity :show="show" @sureSelectArea="onsetCity" @hideShow="onhideShow"></cc-selectDity>
<view class="popup-pay-content">
<view class="popup-pay-title">
@ -298,14 +297,11 @@
this.temporaryList.push(this.attributeList);
} else {
for (var i = 0; i < this.temporaryList.length; i++) {
console.log(this.temporaryList[i].name.indexOf(this.attributeList.name))
if (this.temporaryList[i].name.indexOf(this.attributeList.name) != -1) {
console.log(this.temporaryList)
return
}else{
if (this.temporaryList.length == (i + 1)) {
this.temporaryList.push(this.attributeList);
console.log(this.temporaryList)
return
}
}
@ -354,8 +350,6 @@
this.temporaryList = []
this.columns = []
this.keyList = []
console.log(this.temporaryList)
console.log(this.carList)
if(this.carList != ''){
this.zNum = 0
for(let i=0;i<this.carList.length;i++){
@ -407,7 +401,6 @@
this.$refs.inputDialog.open()
},
carChange(e,index,index1) {
console.log(this.carList)
this.carNum = 0
for (let i = 0; i < this.carList.length; i++) {
this.carList[i].num = 0
@ -628,12 +621,14 @@
border-radius: 10px;
}
.popup-content {
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
.popup-content {
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
margin-bottom: 30rpx;
overflow: scroll;
}
.popup-title-right-box {

13
pages/index/shareStyle.vue

@ -455,7 +455,6 @@
}
.content-right {
// width: 550rpx;
flex: 1;
overflow-y: scroll;
}
@ -526,11 +525,13 @@
}
.popup-content {
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
margin-bottom: 30rpx;
overflow: scroll;
}
.popup-title-right-box {

3
pages/index/waitStorageDetail.vue

@ -299,13 +299,10 @@
.tui-size-24 {
font-size: 24rpx;
// line-height: 24rpx;
}
.tui-price-large {
font-size: 32rpx;
// line-height: 30rpx;
.lineText {
text-decoration: line-through;
font-size: 12px;

9
pages/inventory/addGoods.vue

@ -51,13 +51,11 @@
data() {
return {
fileList1: [],
// 表单数据
formData: {
productName: '',
price: '',
productSn: '',
wholesalePrice: '',
// classification: '',
productPicture: [],
productIntro: '',
categoryId: '',
@ -115,14 +113,7 @@
}
}
},
onShow() {
// let that = this
// uni.$on('classForm', function(data) {
// that.formData.classification = data
// })
},
onLoad(option) {
console.log('option',option)
if(option.dataList){
this.dataList = JSON.parse(option.dataList)
this.formData.productName = this.dataList.productName

2
pages/inventory/addinventory.vue

@ -556,7 +556,6 @@
content: "确定删除此条商品吗?",
success: function(res) {
if(res.confirm){
console.log(that.carList.get(id))
that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(name);
that.carList.get(id).stockLogList.delete(name)
that.carList.get(id).price = that.carList.get(id).productCount * that.carList.get(id).purchasePrice
@ -657,7 +656,6 @@
},
//修改已选规格的数量
GoodsNumChange(e,index,index1){
console.log(this.carList)
let that = this;
this.carList.get(index).stockLogList.set(index1,e)
this.carList.get(index).productCount = 0

28
pages/inventory/changeGoods1.vue

@ -326,10 +326,10 @@
},
//获取弹出层状态
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
},
carChange(e,index,index1) {
console.log(this.carList)
this.carNum = 0
for (let i = 0; i < this.carList.length; i++) {
this.carList[i].num = 0
@ -363,8 +363,6 @@
this.temporaryList = []
this.columns = []
this.keyList = []
console.log(this.temporaryList)
console.log(this.carList)
if(this.carList != ''){
this.zNum = 0
for(let i=0;i<this.carList.length;i++){
@ -420,9 +418,6 @@
if(item.delFlag == 0){
title = '请将商品上架后再操作!'
}
// else if(item.delFlag == 1){
// title = '请将商品入库后再操作!'
// }
uni.showToast({
title: title,
icon: 'none'
@ -491,9 +486,7 @@
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
this.$refs.popup.close()
console.log(this.carList)
this.$refs.popup.close()
},
//删除整条商品
delShop(item){
@ -571,11 +564,13 @@
}
.popup-content {
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
margin-bottom: 30rpx;
overflow: scroll;
}
.popup-title-right-box {
@ -699,8 +694,7 @@
border-right: 3px solid red;
}
.content-right {
// width: 550rpx;
.content-right {
flex: 1;
overflow-y: scroll;
}

4
pages/inventory/gategory.vue

@ -58,7 +58,6 @@
this.tui.request("/app/productCategory/list", "get", {
// shopId: 1,
}, false, true).then((res) => {
console.log(res, 'res');
if (res.code == 200) {
this.indexList = res.result;
} else{
@ -98,7 +97,6 @@
this.tui.request("/app/productCategory/save", "post", {
categoryName: e
}, false, true).then((res) => {
console.log(res, 'res');
if (res.code == 200) {
this.getGategoryList()
uni.showToast({
@ -152,7 +150,6 @@
this.tui.request("/app/productCategory/delById", "post", {
id: this.delItems.id,
}, false, true).then((res) => {
console.log(res, 'res');
if (res.code == 200) {
this.getGategoryList()
uni.showToast({
@ -175,7 +172,6 @@
},
//跳转子分类页
goGategoryLow(id) {
// console.log(id)
uni.navigateTo({
url: '/pages/inventory/gategoryLow?id='+id
})

1
pages/inventory/gategoryLow.vue

@ -136,7 +136,6 @@
}, false, true).then((res) => {
if (res.code == 200) {
item.attributeValue = res.result;
// item.attributeValue = res.result;
}else{
this.tui.toast(res.message)
}

66
pages/inventory/goodsList1.vue

@ -195,7 +195,7 @@
<view class="content-list" v-if="radioType == '4'">
<view class="list-name" style="width:150rpx;padding-left:0;">选择车号</view>
<view class="list-val">
<input type="text" placeholder="请选择" disabled
<input type="text" placeholder="请选择" disabled :value="wlName.companyName"
style="border-bottom: 1px solid #fff;text-align: center;"
@tap.stop="goPopleList('fcName')">
<uni-icons type="right" size="16"
@ -427,7 +427,8 @@
saleDetailList: [],
yNum: 150,
clearMsg:'',
priceType:''
priceType:'',
multiple:1
}
},
components: {
@ -550,7 +551,7 @@
})
this.getAllPrice()
this.getAmountAndWho()
this.noPay = this.shouldPay
// this.noPay = this.shouldPay
},
filters: {
sliceMsg(val) {
@ -657,10 +658,7 @@
this.noPay = this.relPrice - e.target.value;
},
getImg(key) {
return this.carList.get(key).productPicture
// value[1].productPicture
},
//切换销售员
categoryChange(e) {
@ -673,15 +671,13 @@
},
//扫一扫功能
scanCodeAdd() {
// this.clearMsg = '1'
uni.setStorageSync('saoma','1')
uni.scanCode({
success: (res) => {
this.toggle('bottom', res.result);
},
fail: (res) => {
// this.clearMsg = '1'
fail: (res) => {
uni.showToast({
title: '扫描失败',
icon: 'none'
@ -795,8 +791,7 @@
}
}).catch((res) => {})
},
temporaryChange(val) {
console.log('扫一扫',this.temporaryList)
temporaryChange(val) {
this.zNum = 0
for (var i = 0; i < this.temporaryList.length; i++) {
this.zNum += this.temporaryList[i].productCount
@ -805,10 +800,6 @@
//折扣种类选择
discountChange(e) {
let that = this;
// if(this.carList.size == 0){
// this.tui.toast("请先选择商品")
// return
// }
that.shouldPay = 0
this.discountType = e.detail.value;
this.carList.forEach(function(value, key) {
@ -819,7 +810,6 @@
})
this.price = this.shouldPay //永远不变的总金额/实际折扣后的总金额
this.discountNum = 10
// shouldPay
for (let i = 0; i < this.items.length; i++) {
if (this.items[i].value === e.detail.value) {
this.discountCurrent = i;
@ -1121,14 +1111,14 @@
onPrint(opt) {
let that = this;
that.yNum = 150
let strCmd = blesdk.CreatCPCLPage(600, 1040, 1, 0);
let strCmd = blesdk.CreatCPCLPage(600, 2080, 1, 0);
strCmd += blesdk.addCPCLSETMAG(2, 2)
blesdk.addCPCLSETBOLD('bold')
strCmd += blesdk.addCPCLLocation(2); //对齐指令 0-左对齐 1-右对齐 2-居中
strCmd += blesdk.addCPCLLocation(2);
strCmd += blesdk.addCPCLText('0', '30', '24', '0', 0, uni.getStorageSync('shopName'))
strCmd += blesdk.addCPCLSETMAG(1, 1)
strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中
strCmd += blesdk.addCPCLLocation(0);
strCmd += blesdk.addCPCLText('0', '100', '24', '0', 0, '客户:' + this.khName.name)
strCmd += blesdk.addCPCLText('0', '130', '24', '0', 0, '销售:' + this.createByName)
strCmd += blesdk.addCPCLText('280', '130', '24', '0', 0, '日期:' + this.formatDate(new Date(),
@ -1137,33 +1127,53 @@
'=========================================================')
this.carList.forEach(function(value, key) {
strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, value.productName + '(' +
strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, value.productName + '(' +
value.productSn + ')' + '折扣:' + (value.discount < 10 ? value.discount : '无折扣'))
value.stockLogList.forEach(function(value1, key1) {
strCmd += blesdk.addCPCLText('0', that.yNum += 30, '24', '0', 0, (that.slicePrint(
strCmd += blesdk.addCPCLText('0', that.countPrint(), '24', '0', 0, (that.slicePrint(
key1)) + '*' + value1)
strCmd += blesdk.addCPCLText('200', that.yNum, '24', '0', 0, '单价:' + value.lsprice)
strCmd += blesdk.addCPCLText('360', that.yNum, '24', '0', 0, '总价:' + (value
.lsprice * value1))
})
})
strCmd += blesdk.addCPCLText('0', this.yNum += 20, '24', '0', 0,
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0,
'===============================================================')
strCmd += blesdk.addCPCLText('0', this.yNum += 30, '24', '0', 0, '总数量:' + this.totalAmount)
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '总数量:' + this.totalAmount)
strCmd += blesdk.addCPCLText('200', this.yNum, '24', '0', 0, '总金额' + this.shouldPay)
strCmd += blesdk.addCPCLText('400', this.yNum, '24', '0', 0, '应收:' + this.relPrice)
strCmd += blesdk.addCPCLText('0', this.yNum += 30, '24', '0', 0, '实收:' + this.priceOk)
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '实收:' + this.priceOk)
strCmd += blesdk.addCPCLText('200', this.yNum, '24', '0', 0, '欠款:' + (this.relPrice - this.priceOk))
strCmd += blesdk.addCPCLText('400', this.yNum, '24', '0', 0, '其他费用:' + (this.otherExpense == '' ? 0 : this.otherExpense))
strCmd += blesdk.addCPCLText('0', this.yNum += 30, '24', '0', 0, '备注:' + (this.remark == '' ? '无' : this.remark))
strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中
if(this.remark.length >20){
let position = 20;
let part1 = this.remark.substring(0, position);
let part2 = this.remark.substring(position);
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '备注:' + part1)
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, part2)
}else{
strCmd += blesdk.addCPCLText('0', this.countPrint(), '24', '0', 0, '备注:' + this.remark)
}
strCmd += blesdk.addCPCLLocation(0);
strCmd += blesdk.addCPCLPrint();
this.bufferData = strCmd;
console.log(strCmd);
this.$nextTick(()=>{
uni.redirectTo({
url: "/pages/index/order"
})
})
},
//计算打印机当前行高度
countPrint(){
if((this.yNum + 30) >= (1040 * this.multiple)){
this.yNum = this.yNum + (1040 * this.multiple - this.yNum) + 50
this.multiple ++
return this.yNum
}else{
return this.yNum += 30
}
},
//截取
slicePrint(val) {
@ -1214,8 +1224,7 @@
carlist.discount = 0;
}else{
carlist.discount = e.detail.value;
}
console.log(carlist.discount)
}
carlist.discountAmount = carlist.unitPrice * carlist.discount / 10
carlist.price = carlist.unitPrice * carlist.discount / 10 * carlist.productCount
@ -1248,7 +1257,6 @@
content: "确定删除此条商品吗?",
success: function(res) {
if (res.confirm) {
console.log(that.carList.get(id))
that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(name);
that.carList.get(id).stockLogList.delete(name);
that.carList.get(id).price = that.carList.get(id).productCount * that.carList.get(id).unitPrice

7
pages/inventory/inventory.vue

@ -109,7 +109,6 @@
}
},
onShow() {
console.log('onshow');
this.getGategoryList()
this.getWarnMsg()
this.type=uni.getStorageSync('type')
@ -173,7 +172,6 @@
pageSize: '10'
}, false, false).then((res) => {
if (res.code == 200) {
console.log(res.result.records)
this.shopList = res.result.records
} else {
this.tui.toast(res.message)
@ -246,11 +244,7 @@
<style lang="scss" scoped>
.search {
// padding: 20upx;
background-color: #fff;
// position: fixed;
// top: 0;
// z-index: 100;
width: 100%;
background-color: #fff;
}
@ -264,7 +258,6 @@
.title-right {
width: 30%;
/* margin-top: 110rpx; */
border-left: 1px solid #eee;
background: #fff;
}

3
pages/inventory/inventoryDetail.vue

@ -112,13 +112,11 @@
},
//去新增商品页编辑
goToAddGoods(){
//去编辑页的时候,分类不能更改了
uni.navigateTo({
url: "/pages/inventory/addGoods?dataList="+JSON.stringify(this.dataList)
})
},
onPrint(opt) {
//快递单600*1040 入库单440*320
let strCmd = blesdk.CreatCPCLPage(440, 320, 1, 0);
strCmd += blesdk.addCPCLText('0', '30', '24', '0', 0, '商品名:'+this.dataList.productName)
strCmd += blesdk.addCPCLText('0', '80', '24', '0', 0, '货 号:'+this.dataList.productSn)
@ -128,7 +126,6 @@
strCmd += blesdk.addCPCLQRCode(260, 170, 'H', '1', 6, this.dataList.id) //二维码
strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中
strCmd += blesdk.addCPCLPrint();
console.log('这是是数据',strCmd)
this.bufferData = strCmd;
},
}

14
pages/login/login.vue

@ -99,7 +99,6 @@
},
computed: mapState(['type']),
onLoad() {
// uni.clearStorageSync()
if (uni.getStorageSync('hiver_token')) {
uni.reLaunch({
url: '/pages/index/index'
@ -122,8 +121,7 @@
}
}).catch((res) => {})
},
sectionChange(index) {
console.log('给他赋值',index)
sectionChange(index) {
this.wayValue = index;
},
//登录
@ -157,7 +155,6 @@
saveLogin: true,
type: this.wayValue
}, true, true).then((res) => {
console.log(res)
if (res.code == 200) {
uni.setStorageSync("hiver_token", res.result.lcomToken)
uni.setStorageSync("transCompany", res.result.logiticsCompany.id)
@ -175,10 +172,6 @@
this.tui.request(loginUrl, "POST", data, true, true).then((res) => {
if (res.code == 200) {
uni.setStorageSync("hiver_token", res.result.accessToken)
// let state = {
// token: res.result.accessToken
// }
// this.login(state)
//多店铺的时候,在这里加上打开店铺选择弹窗
if(this.wayValue == 2){ //下游客户登录
setTimeout(() => {
@ -196,7 +189,6 @@
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/index'
// url: '/pages/index/logistics'
})
}, 200)
this.tui.toast('登录成功', 2000, true)
@ -247,7 +239,7 @@
}
}).catch((res) => {})
} else if (reg(this.mobile, this.clock) && this.isChoose == true) {
console.log('通过了')
}
},
setTime() { // 倒计时函数
@ -267,7 +259,6 @@
},
//注册
goRegister() {
console.log("111");
uni.navigateTo({
url: '/pages/login/register'
})
@ -292,7 +283,6 @@
<style lang="scss" scoped>
.content {
// margin-top: 190rpx;z
height: 1624rpx;
background: #fff;
}

4
pages/login/register.vue

@ -104,7 +104,7 @@
this.tui.toast(res)
})
}else if(reg(this.formData.mobile,this.clock) && this.isChoose == true){
console.log('通过了')
}
},
setTime(){// 倒计时函数
@ -141,7 +141,7 @@
}
})
}).catch(err => {
console.log('表单错误信息:', err);
})
}
}

2
pages/other/custom.vue

@ -77,7 +77,6 @@
},
methods: {
sectionChange(index) {
console.log(index)
this.current = index
this.bList = []
if (index == 0) {
@ -132,7 +131,6 @@
})
},
dateChange() {
console.log(this.range)
this.query.startDate = this.range[0]
this.query.endDate = this.range[1]
this.sectionChange(this.current)

246
pages/other/logistics.vue

@ -2,15 +2,15 @@
<view>
<view>
<button size="default" type="default" @tap="goAddPeople" hover-class="is-hover">上线</button>
</view>
<view class="contentPadding">
<view class="title">
<i class="iconfont icon-huaban"> 今日订单
<view class="btn" @tap="gotoSearchData">
历史订单 >
</view>
</i>
</view>
</view>
<view class="contentPadding">
<view class="title">
<i class="iconfont icon-huaban"> 今日订单
<view class="btn" @tap="gotoSearchData">
历史订单 >
</view>
</i>
</view>
</view>
<view class="item-wrapper">
<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
@ -36,6 +36,8 @@
</view>
</view>
<u-modal :show="modalShow" title="详细地址" :content='content' @confirm="modalShow = false"></u-modal>
<uni-fab ref="fab" :content="content" :horizontal="horizontal"
@trigger="trigger" />
</view>
</template>
@ -47,8 +49,8 @@
return {
range: '',
name: '',
shopList: [],
list: ['待指派', '待取货','待送达'],
shopList: [],
list: ['待指派', '待取货', '待送达'],
modalShow: false,
content: '地址地址地址',
query: {
@ -59,8 +61,15 @@
},
transCompany: ''
},
},
bList:[]
},
bList: [],
horizontal: 'right',
content: [{
iconPath: '/static/images/tabbar/home.png',
selectedIconPath: '/static/images/tabbar/home-sel.png',
text: '地址配置',
active: false
}]
}
},
created() {
@ -70,110 +79,102 @@
this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59'
this.query.saleVO.transCompany = id
this.range = date
this.getShopList()
this.getShopList()
this.getAllList()
},
methods: {
sectionChange(index) {
console.log(index)
this.current = index
this.bList = []
if (index == 0) {
this.getAllList()
}
if (index == 1) {
this.getList()
}
if (index == 2) {
this.getReturnList()
}
},
getList() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR:2,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
if (res.code !== 200) return
this.bList = res.result
})
},
getAllList() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR:2,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
if (res.code !== 200) return
this.bList = res.result.saleList
})
},
getReturnList() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR:3,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
if (res.code !== 200) return
this.bList = res.result.returnSaleList
})
},
dateChange() {
console.log(this.range)
this.query.startDate = this.range[0]
this.query.endDate = this.range[1]
this.sectionChange(this.current)
},
gotoInfo() {
uni.navigateTo({
url: `/pages/index/shopInfo`
})
},
gotoSearchData() {
methods: {
sectionChange(index) {
this.current = index
this.bList = []
if (index == 0) {
this.getAllList()
}
if (index == 1) {
this.getList()
}
if (index == 2) {
this.getReturnList()
}
},
trigger(e) {
// console.log(e)
// this.content[e.index].active = !e.item.active
//e.item.text
uni.navigateTo({
url: '/pages/other/logisticsDetail'
})
url: `/pages/other/logisticsAddress`
})
},
getList() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR: 2,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
if (res.code !== 200) return
this.bList = res.result
})
},
getAllList() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR: 2,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
if (res.code !== 200) return
this.bList = res.result.saleList
})
},
getReturnList() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR: 3,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
if (res.code !== 200) return
this.bList = res.result.returnSaleList
})
},
dateChange() {
this.query.startDate = this.range[0]
this.query.endDate = this.range[1]
this.sectionChange(this.current)
},
gotoInfo() {
uni.navigateTo({
url: `/pages/index/shopInfo`
})
},
gotoSearchData() {
uni.navigateTo({
url: '/pages/other/logisticsDetail'
})
},
getShopList() {
// this.tui.request('/app/sale/listCompany', 'POST', {}, false, true, false).then(res => {
// if (res.code !== 200) return
// this.shopList = res.result.map((v) => {
// return {
// text: v.shopName,
// value: v.id
// }
// })
// })
const that = this
uni.request({
url: tui.interfaceUrl() + '/app/sale/listCompany',
data: this.query.saleVO,
header: {
'content-type': 'application/json',
// 'Authorization': tui.getToken()
'appWLToken': tui.getToken()
},
method: 'post', //'GET','POST'
method: 'post',
dataType: 'json',
success: (res) => {
that.shopList = res.data.result
console.log(res)
},
fail: (res) => {
tui.toast("网络不给力,请稍后再试~")
console.log(res)
}
})
},
onCellClick(item) {
this.modalShow = true
this.content = item.receiveAddress
console.log('item', item)
},
onDatePackerChange(date) {
console.log(date)
if (!date) {
this.query.saleVO.searchDateVo.startDate = ''
this.query.saleVO.searchDateVo.endDate = ''
@ -209,7 +210,7 @@
color: #ffffff;
background: #5fd9ee;
width: 90%;
margin:20rpx auto;
margin: 20rpx auto;
}
.example-body {}
@ -235,36 +236,37 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.contentPadding {
padding: 0 20upx;
background-color: #fff;
color: #909399;
.title {
padding-left: 20rpx;
font-size: 32rpx;
color: #303133;
line-height: 66rpx;
image {
display: inline-block;
width: 40rpx;
vertical-align: middle;
}
.btn {
text-align: right;
width: 24%;
float: right;
font-size: 26rpx;
color: $u-primary;
}
}
.grid-text {
font-size: 28rpx;
margin-bottom: 26rpx;
}
}
.contentPadding {
padding: 0 20upx;
background-color: #fff;
color: #909399;
.title {
padding-left: 20rpx;
font-size: 32rpx;
color: #303133;
line-height: 66rpx;
image {
display: inline-block;
width: 40rpx;
vertical-align: middle;
}
.btn {
text-align: right;
width: 24%;
float: right;
font-size: 26rpx;
color: $u-primary;
}
}
.grid-text {
font-size: 28rpx;
margin-bottom: 26rpx;
}
}
</style>

18
pages/other/logisticsDetail.vue

@ -63,7 +63,6 @@
},
methods: {
sectionChange(index) {
console.log(index)
this.current = index
this.bList = []
if (index == 0) {
@ -107,7 +106,6 @@
})
},
dateChange() {
console.log(this.range)
this.query.startDate = this.range[0]
this.query.endDate = this.range[1]
this.sectionChange(this.current)
@ -125,43 +123,29 @@
})
},
getShopList() {
// this.tui.request('/app/sale/listCompany', 'POST', {}, false, true, false).then(res => {
// if (res.code !== 200) return
// this.shopList = res.result.map((v) => {
// return {
// text: v.shopName,
// value: v.id
// }
// })
// })
const that = this
uni.request({
url: tui.interfaceUrl() + '/app/sale/listCompany',
data: this.query.saleVO,
header: {
'content-type': 'application/json',
// 'Authorization': tui.getToken()
'appWLToken': tui.getToken()
},
method: 'post', //'GET','POST'
method: 'post',
dataType: 'json',
success: (res) => {
that.shopList = res.data.result
console.log(res)
},
fail: (res) => {
tui.toast("网络不给力,请稍后再试~")
console.log(res)
}
})
},
onCellClick(item) {
this.modalShow = true
this.content = item.receiveAddress
console.log('item', item)
},
onDatePackerChange(date) {
console.log(date)
if (!date) {
this.query.saleVO.searchDateVo.startDate = ''
this.query.saleVO.searchDateVo.endDate = ''

1
pages/rebate/detail.vue

@ -31,7 +31,6 @@
}, false, false, true).then((res) => {
if (res.code !== 200) return
this.commissionList = res.result
console.log(res)
})
}
}

3
pages/rebate/rebate.vue

@ -62,16 +62,13 @@
},
methods: {
onCardClick(e) {
console.log(e)
},
getList() {
console.log('this.$store', this.$store.shopId)
this.tui.request('/app/returnCommission/listWithReturned', 'get', {
shopId: '001'
}, false, false, true).then((res) => {
if (res.code !== 200) return
this.notYetCommissionList = res.result
console.log(res)
})
},
getCommissionList() {

2
pages/rebate/withdrawal.vue

@ -30,7 +30,6 @@
export default {
name: "withdrawal",
onLoad(options) {
console.log(options)
this.canBalance = options.balance
},
data() {
@ -42,7 +41,6 @@ export default {
computed:{
canSave() {
if (!this.balance) return true
console.log(this.balance < this.canBalance,this.balance , this.canBalance)
if (+this.balance > +this.canBalance) return true
return false
}

7
pages/staff/addStaff/addStaff.vue

@ -62,8 +62,7 @@
},
onLoad(options) {
const type = options.type
const item = JSON.parse(options.item)
console.log(item)
const item = JSON.parse(options.item)
this.type = options.type
if (type === 'edit') {
this.addForm.nickname = item.nickname
@ -77,7 +76,6 @@
},
methods: {
onFormSubmit() {
console.log('submit')
this.$refs.addForm.validate().then(async () => {
let url;
if(this.type=='edit'){
@ -90,12 +88,11 @@
true, false)
if (res.code == 200) {
uni.navigateBack()
console.log(res)
} else {
this.tui.toast(res.message)
}
}, (reason) => {
console.log(reason)
})
}
}

5
pages/staff/clock/clock.vue

@ -78,10 +78,10 @@
const amapObject = new amap.AMapWX({ key: 'f06653d65bcefa97e94ab08917389842' })
amapObject.getRegeo({
success: (res) => {
console.log(res, res[0].regeocodeData.formatted_address)
},
fail: (err) => {
console.log(err)
}
})
// if (!this.isClock) {
@ -95,7 +95,6 @@
// } else {
// this.tui.toast(res.message)
// }
// console.log(res)
// })
// }
}

5
pages/staff/signRule/signRule.vue

@ -51,12 +51,11 @@
this.addForm.longitude = res[0].longitude
},
fail: (err) => {
console.log(err)
}
})
},
onFormSubmit() {
console.log('submit')
this.$refs.addForm.validate().then(async () => {
let url;
if (this.type == 'edit') {
@ -69,12 +68,10 @@
true, false)
if (res.code == 200) {
uni.navigateBack()
console.log(res)
} else {
this.tui.toast(res.message)
}
}, (reason) => {
console.log(reason)
})
},
start(e) {

Loading…
Cancel
Save