Browse Source

11.13日

master
tianyi@bogon 3 years ago
parent
commit
46d1ff2d7b
  1. 5
      pages/billing/addUser.vue
  2. 6
      pages/billing/changeGoods1.vue
  3. 125
      pages/index/addHangOrder.vue
  4. 961
      pages/index/downStearmList.vue
  5. 12
      pages/index/index.vue
  6. 4
      pages/index/orderDetail.vue
  7. 39
      pages/index/shareStyle.vue
  8. 68
      pages/inventory/changeGoods1.vue
  9. 12
      pages/inventory/goodsList1.vue
  10. 8
      pages/inventory/inventory.vue
  11. 19
      pages/login/login.vue
  12. 19
      pages/other/custom.vue

5
pages/billing/addUser.vue

@ -70,11 +70,6 @@
rules: [{
required: true,
errorMessage: '请输入姓名',
},
{
minLength: 2,
maxLength: 5,
errorMessage: '姓名长度在 {minLength} 到 {maxLength} 个字符',
}
]
},

6
pages/billing/changeGoods1.vue

@ -8,7 +8,7 @@
<view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="item"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="padding: 0 40rpx;" :class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;" :class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
</view>
</view>
<view class="content-right">
@ -94,7 +94,7 @@
<view class="checkList-box">
{{item.name}}
</view>
<uni-number-box v-model="item.productCount" @change="temporaryChange" />
<uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" />
</view>
</view>
<view class="popup-bottom" v-for="item in temporaryList">
@ -152,7 +152,7 @@
<view class="checkList-box">
{{items.name}}
</view>
<uni-number-box v-model="items.productCount" @change="change" />
<uni-number-box max="100000" v-model="items.productCount" @change="change" />
</view>
</view>
</view>

125
pages/index/addHangOrder.vue

@ -28,7 +28,7 @@
<view class="collapse-1">
<view class="order-notes">
<text style="color: red;">备注:</text>
{{item.remark}}
{{item.remark==null?'暂无':item.remark}}
</view>
<view class="shop-list" v-for="(items,index1) in item.saleDetailDTOList">
<view class="order-name">
@ -116,7 +116,7 @@
<view class="shop-checkList-box">
{{item.name}}
</view>
<uni-number-box v-model="item.productCount" @change="temporaryChange" />
<uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" />
</view>
</view>
<view class="shop-popup-bottom" v-for="item in temporaryList">
@ -152,7 +152,7 @@
</uni-popup>
<!-- 编辑挂单 -->
<uni-popup ref="setDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" :value="value" title="挂单名称" placeholder="请输入挂单名称"
<uni-popup-dialog ref="inputClose" mode="input" v-model="value" @input='' title="挂单名称" placeholder="请输入挂单名称"
@confirm="setDetail"></uni-popup-dialog>
</uni-popup>
<!-- 查看大图弹出层 -->
@ -410,7 +410,8 @@
}
this.carList.push(data)
// this.temporaryList = []
this.purchasePrice = ''
this.purchasePrice = ''
this.temporaryList = []
this.zPrice = ''
this.zNum = ''
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
@ -432,7 +433,8 @@
saleId: this.hangId
}, false, false).then((res) => {
if (res.code == 200) {
this.getRegList()
this.getRegList()
this.carList = []
} else {
this.tui.toast(res.message)
}
@ -470,33 +472,45 @@
this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => {
if (res.code == 200) {
this.goodsDetail = res.result;
if (typeof(this.goodsDetail.attributeList) == 'string') {
let newObj = JSON.parse(this.goodsDetail.attributeList)
let newArr = []
for (let val in newObj) {
let valueObj = [];
for (var i = 0; i < newObj[val].length; i++) {
valueObj.push({
value: newObj[val][i],
isChecked: false
})
this.attrNameList.push({
value: newObj[val][i],
name: val,
isChecked: false
this.tui.request("/app/productAttribute/selectByCategoryId", "POST", {
categoryId: this.goodsDetail.categoryId
}, false, true).then((res1) => {
if (res1.code == 200) {
this.attrList = res1.result;
if (res1.result.length > 0) {
let newArr = []
this.attrList.forEach((items) => {
this.tui.request("/app/productAttributeValue/selectByAttributeId","get", {
id: items.id
}, false, true).then((res2) => {
if (res2.code == 200) {
let valueObj = [];
for (var i = 0; i < res2.result.length; i++) {
valueObj.push({
value: res2.result[i].value,
isChecked: false
})
}
newArr.push({
name: items.attributeName,
value: valueObj
})
this.goodsDetail.attributeList = newArr;
this.goodsDetail.attributeList.forEach((item, index) => {
this.columns[index] = item.value;
this.keyList[index] = item.name;
})
} else {
this.tui.toast(res.message)
}
console.log(this.goodsDetail)
}).catch((res) => {})
})
}
newArr.push({
name: val,
value: valueObj
})
} else {
this.tui.toast(res.message)
}
this.goodsDetail.attributeList = newArr;
this.goodsDetail.attributeList.forEach((item, index) => {
this.columns[index] = item.value;
this.keyList[index] = item.name;
})
}
}).catch((res) => {})
} else {
this.tui.toast(res.message)
}
@ -510,8 +524,8 @@
//新增挂单
addReg(e) {
this.tui.request("/app/sale/saveOrder", "POST", {
saleName: e,
status:7
saleName: e,
status: 7
}, false, false).then((res) => {
if (res.code == 200) {
this.tui.toast("新增成功")
@ -581,15 +595,18 @@
})
},
//编辑挂单信息
setDetail() {
setDetail(e) {
this.tui.request("/app/sale/updateOrder", "POST", {
saleName: this.value,
saleName: e.detail?'':e,
id: this.list.id,
remark: this.voiceText
}, false, false).then((res) => {
if (res.code == 200) {
if (res.code == 200) {
this.value = ''
this.voiceText = ''
this.tui.toast("编辑成功")
this.getRegList();
this.getRegList();
this.$refs.popup.close()
} else {
this.tui.toast(res.message)
}
@ -604,23 +621,25 @@
},
//带参数跳转到开单页
goSaleGoods(item) {
let dataList = []
for (let i=0;i<item.saleDetailDTOList.length;i++) {
let obj = {}
obj.saleDetailQueryDTO = item.saleDetailDTOList[i].stockLogList1
obj.id = item.saleDetailDTOList[i].productId
obj.lsprice = item.saleDetailDTOList[i].price
obj.num = item.saleDetailDTOList[i].productCount
obj.price = item.saleDetailDTOList[i].discountAmount
obj.productName = item.saleDetailDTOList[i].productName
obj.producticture = item.saleDetailDTOList[i].productPicture
obj.productSn = item.saleDetailDTOList[i].productSn
obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice
obj.saleId = item.saleDetailDTOList[i].saleId
obj.remark = item.remark
dataList.push(obj)
}
uni.setStorageSync('carList1',JSON.stringify(dataList))
if(item){
let dataList = []
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
let obj = {}
obj.saleDetailQueryDTO = item.saleDetailDTOList[i].stockLogList1
obj.id = item.saleDetailDTOList[i].productId
obj.lsprice = item.saleDetailDTOList[i].price
obj.num = item.saleDetailDTOList[i].productCount
obj.price = item.saleDetailDTOList[i].discountAmount
obj.productName = item.saleDetailDTOList[i].productName
obj.producticture = item.saleDetailDTOList[i].productPicture
obj.productSn = item.saleDetailDTOList[i].productSn
obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice
obj.saleId = item.saleDetailDTOList[i].saleId
obj.remark = item.remark
dataList.push(obj)
}
uni.setStorageSync('carList1', JSON.stringify(dataList))
}
uni.switchTab({
url: '/pages/inventory/goodsList1'
})
@ -656,7 +675,7 @@
font-size: 37rpx;
border-bottom: 0.5px solid #eee;
margin: 0 auto;
position: relative;
position: relative;
background: #ECF5FF;
}

961
pages/index/downStearmList.vue

File diff suppressed because it is too large

12
pages/index/index.vue

@ -20,7 +20,7 @@
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/shareStyle')">
<text>推款</text>
</view>
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/shareStyle')">
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/waitStorageDetail')">
<text>待入库</text>
</view>
</view>
@ -102,15 +102,13 @@
arrow-direction="left"></u-cell>
<u-cell icon="setting-fill" url="/pages/index/shopInfo" title="修改个人信息" clickable isLink
arrow-direction="left"></u-cell>
<u-cell icon="integral-fill" url="/pages/index/upstream" title="上游供货商欠款" clickable isLink
arrow-direction="left"></u-cell>
<u-cell icon="integral-fill" url="/pages/index/downstream" title="下游客户欠款" clickable isLink
<u-cell icon="integral-fill" url="/pages/index/upstream" title="供货商欠款" clickable isLink
arrow-direction="left"></u-cell>
<u-cell icon="integral-fill" url="/pages/index/returnList" title="待退货" clickable isLink
<u-cell icon="integral-fill" url="/pages/index/downstream" title="客户欠款" clickable isLink
arrow-direction="left"></u-cell>
<u-cell icon="integral-fill" url="/pages/index/order?type=ruku" title="入库单详情" clickable isLink
<u-cell icon="integral-fill" url="/pages/index/order?type=ruku" title="采购单历史" clickable isLink
arrow-direction="left"></u-cell>
<u-cell icon="integral-fill" url="/pages/index/order?type=dingdan" title="订单详情" clickable isLink
<u-cell icon="integral-fill" url="/pages/index/order?type=dingdan" title="销售单历史" clickable isLink
arrow-direction="left"></u-cell>
</u-cell-group>
</view>

4
pages/index/orderDetail.vue

@ -8,7 +8,7 @@
<u-collapse>
<u-collapse-item :open="isReturn" v-for="(item,index) in list" :key="index" :title="item.productName"
:name="item.saleId"
:value="'¥'+ item.wholesalePrice + ' * ' + (sales.discount < 10 ? sales.discount : item.discount)">
:value="'单价:'+ item.wholesalePrice + ' 折扣: ' + sales.discount + '折'">
<view class="u-collapse-content" v-for="(val, index2) in item.stockLogList1" :key="index2">
<!-- <u-icon name="checkmark-circle" color="#5fd9ee" size="20" v-if="isReturn"></u-icon>
<u-icon name="checkmark-circle" color="#999" size="20" v-if="isReturn"></u-icon> -->
@ -346,7 +346,7 @@
this.tui.request('/app/purchase/editPayPrice','post', {
id:this.sales.id,
price:e
},false,false).then(res => {
},false,true).then(res => {
uni.showToast({
title: res.message,
icon: 'none'

39
pages/index/shareStyle.vue

@ -7,7 +7,7 @@
<view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="item"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="padding: 0 40rpx;" :class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;" :class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
</view>
</view>
<view class="content-right">
@ -150,33 +150,18 @@
},
//点击分类获取商品列表
getShareList(id) {
var that = this;
// this.shopList = []
this.tui.request("/app/product/getShareList", "POST", {
categoryId: id,
supplierName: this.searchName,
pageNum: this.pageNum,
pageSize: '10'
}, false, false).then((res) => {
this.tui.request("/app/product/getShareList", "POST", {
categoryId: id,
supplierName: this.searchName,
pageNum: this.pageNum,
pageSize: '10'
}, false, false).then((res) => {
if (res.code == 200) {
if(this.shopList == ''){
for (var i = 0; i < res.result.records.length; i++) {
this.shopList=res.result.records;
}
}else{
for (var i = 0; i < that.shopList.length; i++) {
if(this.shopList[i].id !=res.result.records[0].id && i==this.shopList.length){
for (var i = 0; i < res.result.records.length; i++) {
this.shopList.push(res.result.records[i]);
}
}
}
}
console.log(this.shopList)
} else {
this.tui.toast(res.message)
}
console.log(res.result.records)
this.shopList = res.result.records
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
//顶部搜索框

68
pages/inventory/changeGoods1.vue

@ -8,7 +8,7 @@
<view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="item"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="padding: 0 40rpx;" :class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;" :class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
</view>
</view>
<view class="content-right">
@ -94,7 +94,7 @@
<view class="checkList-box">
{{item.name}}
</view>
<uni-number-box v-model="item.productCount" @change="temporaryChange" />
<uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" />
</view>
</view>
<view class="popup-bottom" v-for="item in temporaryList">
@ -137,7 +137,7 @@
<view class="checkList-box">
{{items.name}}
</view>
<uni-number-box v-model="items.productCount" @change="change" />
<uni-number-box max="100000" v-model="items.productCount" @change="change" />
</view>
</view>
</view>
@ -328,34 +328,46 @@
checkGoods(item) {
this.tui.request("/app/product/getById/"+item.id, "POST", {}, false, true).then((res) => {
if (res.code == 200) {
this.goodsDetail = res.result
if (typeof(this.goodsDetail.attributeList) == 'string') {
let newObj = JSON.parse(this.goodsDetail.attributeList)
let newArr = []
for (let val in newObj) {
let valueObj = [];
for (var i = 0; i < newObj[val].length; i++) {
valueObj.push({
value: newObj[val][i],
isChecked: false
})
this.attrNameList.push({
value: newObj[val][i],
name: val,
isChecked: false
this.goodsDetail = res.result;
this.tui.request("/app/productAttribute/selectByCategoryId", "POST", {
categoryId: this.goodsDetail.categoryId
}, false, true).then((res1) => {
if (res1.code == 200) {
this.attrList = res1.result;
if (res1.result.length > 0) {
let newArr = []
this.attrList.forEach((items) => {
this.tui.request("/app/productAttributeValue/selectByAttributeId","get", {
id: items.id
}, false, true).then((res2) => {
if (res2.code == 200) {
let valueObj = [];
for (var i = 0; i < res2.result.length; i++) {
valueObj.push({
value: res2.result[i].value,
isChecked: false
})
}
newArr.push({
name: items.attributeName,
value: valueObj
})
this.goodsDetail.attributeList = newArr;
this.goodsDetail.attributeList.forEach((item, index) => {
this.columns[index] = item.value;
this.keyList[index] = item.name;
})
} else {
this.tui.toast(res.message)
}
console.log(this.goodsDetail)
}).catch((res) => {})
})
}
newArr.push({
name: val,
value: valueObj
})
} else {
this.tui.toast(res.message)
}
this.goodsDetail.attributeList = newArr;
this.goodsDetail.attributeList.forEach((item, index) => {
this.columns[index] = item.value;
this.keyList[index] = item.name;
})
}
}).catch((res) => {})
} else {
this.tui.toast(res.message)
}

12
pages/inventory/goodsList1.vue

@ -190,9 +190,9 @@
</view>
</view>
<view class="content-list" v-if="radioType !=''">
<view class="tui-flex-shrink">配送方式</view>
<view class="tui-goods-price">
<uni-data-checkbox v-model="radio1" :localdata="sex"
<view class="list-name">配送方式</view>
<view class="list-val" style="line-height: 90rpx;">
<uni-data-checkbox v-model="value" :localdata="sex"
@change="checkBoxChange"></uni-data-checkbox>
</view>
</view>
@ -261,7 +261,7 @@
discountNum:10, //整体折扣
priceCurrent:'',
priceOk:'', //已收金额
value: '',
value: 0,
sex: [{
text: '平台配送',
value: 0
@ -826,7 +826,9 @@
.shop-productName view {
height: 55rpx;
}
.checklist-group{
height: 80rpx !important;
}
// .shop-name {
// .uni-icons {
// color: #088FEB !important;

8
pages/inventory/inventory.vue

@ -27,11 +27,11 @@
</view>
</view>
<view class="title-right" @click="onGridClick('0')">
<view class="title-right" @tap.stop="onGridClick('0')">
<view class="title-right-top title-btn">
分类管理
</view>
<view class="title-right-bottom title-btn" @click="onGridClick('1')">
<view class="title-right-bottom title-btn" @tap.stop="onGridClick('1')">
新增入库
</view>
</view>
@ -40,7 +40,7 @@
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/编号" cancelButton="none" @confirm="search" />
<view class="title-right-bottom title-btn"
style="width:22%;float: left;height:75rpx;line-height: 75rpx;margin-top:20rpx;"
@click="onGridClick('2')">
@tap.stop="onGridClick('2')">
新增商品
</view>
</view>
@ -48,7 +48,7 @@
<view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="item"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="padding: 0 40rpx;" :class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;" :class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
</view>
</view>
<view class="content-right">

19
pages/login/login.vue

@ -130,7 +130,8 @@
}
}).catch((res) => {})
},
sectionChange(index) {
sectionChange(index) {
console.log('给他赋值',index)
this.wayValue = index;
},
//登录
@ -159,15 +160,12 @@
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)
// let state = {
// token: res.result.accessToken
// }
// this.login(state)
//多店铺的时候,在这里加上打开店铺选择弹窗
if (res.result.shopList.length > 1 && this.wayValue == 0) {
this.shopList = res.result.shopList;
this.toggle("center");
} else if (this.wayValue == 1) { //物流公司登录
if (this.wayValue == 1) { //物流公司登录
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/logistics'
@ -181,6 +179,9 @@
})
}, 200)
this.tui.toast('登录成功', 2000, true)
}else if (res.result.shopList.length > 1 && this.wayValue == 0) {
this.shopList = res.result.shopList;
this.toggle("center");
}else{
uni.setStorageSync('shopName',res.result.shopList[0].shopName)
uni.setStorageSync('type',res.result.shopList[0].type)

19
pages/other/custom.vue

@ -55,10 +55,11 @@
range: ['2023-10-1', '2023-10-2'],
name: '',
shopList: [],
list: ['全部', '采购单', '退货单'],
list: ['采购单', '退货单'],
// 或者如下,也可以配置keyName参数修改对象键名
// list: [{name: '未付款'}, {name: '待评价'}, {name: '已付款'}],
current: 0,
current: 0,
userId:'',
shopId: '',
bList: [],
query: {
@ -92,7 +93,7 @@
}
},
getShopList() {
this.tui.request('/app/shop/getAll', 'get', {}, false, true, false).then(res => {
this.tui.request('/app/shop/getAllShopByCustomer', 'get', {}, false, true, false).then(res => {
if (res.code !== 200) return
this.shopList = res.result.map((v) => {
return {
@ -103,8 +104,8 @@
})
},
getList() {
this.tui.request('/app/sale/list', 'post', {
userId: this.userId,
this.tui.request('/app/sale/listAll', 'post', {
remarkSR:2,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
@ -113,8 +114,8 @@
})
},
getAllList() {
this.tui.request('/app/sale/listAll', 'post', {
userId: this.userId,
this.tui.request('/app/sale/listAll', 'post', {
remarkSR:2,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
@ -123,8 +124,8 @@
})
},
getReturnList() {
this.tui.request('/app/sale/listAll', 'post', {
userId: this.userId,
this.tui.request('/app/sale/listAll', 'post', {
remarkSR:3,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {

Loading…
Cancel
Save