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. 59
      pages/index/addHangOrder.vue
  4. 131
      pages/index/downStearmList.vue
  5. 12
      pages/index/index.vue
  6. 4
      pages/index/orderDetail.vue
  7. 21
      pages/index/shareStyle.vue
  8. 44
      pages/inventory/changeGoods1.vue
  9. 12
      pages/inventory/goodsList1.vue
  10. 8
      pages/inventory/inventory.vue
  11. 17
      pages/login/login.vue
  12. 13
      pages/other/custom.vue

5
pages/billing/addUser.vue

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

6
pages/billing/changeGoods1.vue

@ -8,7 +8,7 @@
<view class="content-left"> <view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="item" <view class="left-box" v-for="(item, index) in indexList" :key="item"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)"> :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> </view>
<view class="content-right"> <view class="content-right">
@ -94,7 +94,7 @@
<view class="checkList-box"> <view class="checkList-box">
{{item.name}} {{item.name}}
</view> </view>
<uni-number-box v-model="item.productCount" @change="temporaryChange" /> <uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" />
</view> </view>
</view> </view>
<view class="popup-bottom" v-for="item in temporaryList"> <view class="popup-bottom" v-for="item in temporaryList">
@ -152,7 +152,7 @@
<view class="checkList-box"> <view class="checkList-box">
{{items.name}} {{items.name}}
</view> </view>
<uni-number-box v-model="items.productCount" @change="change" /> <uni-number-box max="100000" v-model="items.productCount" @change="change" />
</view> </view>
</view> </view>
</view> </view>

59
pages/index/addHangOrder.vue

@ -28,7 +28,7 @@
<view class="collapse-1"> <view class="collapse-1">
<view class="order-notes"> <view class="order-notes">
<text style="color: red;">备注:</text> <text style="color: red;">备注:</text>
{{item.remark}} {{item.remark==null?'暂无':item.remark}}
</view> </view>
<view class="shop-list" v-for="(items,index1) in item.saleDetailDTOList"> <view class="shop-list" v-for="(items,index1) in item.saleDetailDTOList">
<view class="order-name"> <view class="order-name">
@ -116,7 +116,7 @@
<view class="shop-checkList-box"> <view class="shop-checkList-box">
{{item.name}} {{item.name}}
</view> </view>
<uni-number-box v-model="item.productCount" @change="temporaryChange" /> <uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" />
</view> </view>
</view> </view>
<view class="shop-popup-bottom" v-for="item in temporaryList"> <view class="shop-popup-bottom" v-for="item in temporaryList">
@ -152,7 +152,7 @@
</uni-popup> </uni-popup>
<!-- 编辑挂单 --> <!-- 编辑挂单 -->
<uni-popup ref="setDialog" type="dialog"> <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> @confirm="setDetail"></uni-popup-dialog>
</uni-popup> </uni-popup>
<!-- 查看大图弹出层 --> <!-- 查看大图弹出层 -->
@ -411,6 +411,7 @@
this.carList.push(data) this.carList.push(data)
// this.temporaryList = [] // this.temporaryList = []
this.purchasePrice = '' this.purchasePrice = ''
this.temporaryList = []
this.zPrice = '' this.zPrice = ''
this.zNum = '' this.zNum = ''
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) { for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
@ -433,6 +434,7 @@
}, false, false).then((res) => { }, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getRegList() this.getRegList()
this.carList = []
} else { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }
@ -470,37 +472,49 @@
this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => { this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.goodsDetail = res.result; this.goodsDetail = res.result;
if (typeof(this.goodsDetail.attributeList) == 'string') { this.tui.request("/app/productAttribute/selectByCategoryId", "POST", {
let newObj = JSON.parse(this.goodsDetail.attributeList) categoryId: this.goodsDetail.categoryId
}, false, true).then((res1) => {
if (res1.code == 200) {
this.attrList = res1.result;
if (res1.result.length > 0) {
let newArr = [] let newArr = []
for (let val in newObj) { this.attrList.forEach((items) => {
this.tui.request("/app/productAttributeValue/selectByAttributeId","get", {
id: items.id
}, false, true).then((res2) => {
if (res2.code == 200) {
let valueObj = []; let valueObj = [];
for (var i = 0; i < newObj[val].length; i++) { for (var i = 0; i < res2.result.length; i++) {
valueObj.push({ valueObj.push({
value: newObj[val][i], value: res2.result[i].value,
isChecked: false
})
this.attrNameList.push({
value: newObj[val][i],
name: val,
isChecked: false isChecked: false
}) })
} }
newArr.push({ newArr.push({
name: val, name: items.attributeName,
value: valueObj value: valueObj
}) })
}
this.goodsDetail.attributeList = newArr; this.goodsDetail.attributeList = newArr;
this.goodsDetail.attributeList.forEach((item, index) => { this.goodsDetail.attributeList.forEach((item, index) => {
this.columns[index] = item.value; this.columns[index] = item.value;
this.keyList[index] = item.name; this.keyList[index] = item.name;
}) })
} else {
this.tui.toast(res.message)
}
console.log(this.goodsDetail)
}).catch((res) => {})
})
} }
} else { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }
}).catch((res) => {}) }).catch((res) => {})
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
}, },
//查看大图 //查看大图
largeImg(img) { largeImg(img) {
@ -511,7 +525,7 @@
addReg(e) { addReg(e) {
this.tui.request("/app/sale/saveOrder", "POST", { this.tui.request("/app/sale/saveOrder", "POST", {
saleName: e, saleName: e,
status:7 status: 7
}, false, false).then((res) => { }, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.tui.toast("新增成功") this.tui.toast("新增成功")
@ -581,15 +595,18 @@
}) })
}, },
//编辑挂单信息 //编辑挂单信息
setDetail() { setDetail(e) {
this.tui.request("/app/sale/updateOrder", "POST", { this.tui.request("/app/sale/updateOrder", "POST", {
saleName: this.value, saleName: e.detail?'':e,
id: this.list.id, id: this.list.id,
remark: this.voiceText remark: this.voiceText
}, false, false).then((res) => { }, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.value = ''
this.voiceText = ''
this.tui.toast("编辑成功") this.tui.toast("编辑成功")
this.getRegList(); this.getRegList();
this.$refs.popup.close()
} else { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }
@ -604,8 +621,9 @@
}, },
//带参数跳转到开单页 //带参数跳转到开单页
goSaleGoods(item) { goSaleGoods(item) {
if(item){
let dataList = [] let dataList = []
for (let i=0;i<item.saleDetailDTOList.length;i++) { for (let i = 0; i < item.saleDetailDTOList.length; i++) {
let obj = {} let obj = {}
obj.saleDetailQueryDTO = item.saleDetailDTOList[i].stockLogList1 obj.saleDetailQueryDTO = item.saleDetailDTOList[i].stockLogList1
obj.id = item.saleDetailDTOList[i].productId obj.id = item.saleDetailDTOList[i].productId
@ -620,7 +638,8 @@
obj.remark = item.remark obj.remark = item.remark
dataList.push(obj) dataList.push(obj)
} }
uni.setStorageSync('carList1',JSON.stringify(dataList)) uni.setStorageSync('carList1', JSON.stringify(dataList))
}
uni.switchTab({ uni.switchTab({
url: '/pages/inventory/goodsList1' url: '/pages/inventory/goodsList1'
}) })

131
pages/index/downStearmList.vue

@ -84,7 +84,7 @@
<view class="checkList-box"> <view class="checkList-box">
{{item.name}} {{item.name}}
</view> </view>
<uni-number-box v-model="item.productCount" @change="temporaryChange" /> <uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" />
</view> </view>
</view> </view>
<view class="popup-bottom" v-for="item in temporaryList"> <view class="popup-bottom" v-for="item in temporaryList">
@ -104,8 +104,10 @@
<!-- 省市区选择 show:是否显示 @sureSelectArea:确认事件 @hideShow:隐藏事件--> <!-- 省市区选择 show:是否显示 @sureSelectArea:确认事件 @hideShow:隐藏事件-->
<cc-selectDity :show="show" @sureSelectArea="onsetCity" @hideShow="onhideShow"></cc-selectDity> <cc-selectDity :show="show" @sureSelectArea="onsetCity" @hideShow="onhideShow"></cc-selectDity>
<view class="popup-pay-content"> <view class="popup-pay-content">
<view class="popup-pay-title">
填写信息
</view>
<uni-forms ref="form" :modelValue="formData" :rules="rules" labelWidth="85px"> <uni-forms ref="form" :modelValue="formData" :rules="rules" labelWidth="85px">
<uni-forms-item label="姓名" name="consigneeName"> <uni-forms-item label="姓名" name="consigneeName">
<uni-easyinput type="text" v-model="formData.consigneeName" placeholder="请输入人员姓名" /> <uni-easyinput type="text" v-model="formData.consigneeName" placeholder="请输入人员姓名" />
</uni-forms-item> </uni-forms-item>
@ -121,7 +123,7 @@
<uni-easyinput type="textarea" v-model="formData.address" /> <uni-easyinput type="textarea" v-model="formData.address" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<view @tap="backPrevPage">开单</view> <view class="address-btn" @tap="backPrevPage">开单</view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 购物车弹出层 --> <!-- 购物车弹出层 -->
@ -153,7 +155,7 @@
<view class="checkList-box"> <view class="checkList-box">
{{items.name}} {{items.name}}
</view> </view>
<uni-number-box v-model="items.productCount" @change="change" /> <uni-number-box max="100000" v-model="items.productCount" @change="change" />
</view> </view>
</view> </view>
</view> </view>
@ -191,15 +193,15 @@
carList: [], carList: [],
columns: [], columns: [],
keyList: [], keyList: [],
specsList:[], specsList: [],
evalue:[], evalue: [],
attributeList:[], attributeList: [],
zNum:0, zNum: 0,
addressObj:{}, addressObj: {},
show:false, show: false,
zPrice:0, zPrice: 0,
carType:0, carType: 0,
carNum:0, carNum: 0,
formData: { formData: {
consigneeMobile: '', consigneeMobile: '',
consigneeName: '', consigneeName: '',
@ -215,13 +217,7 @@
rules: [{ rules: [{
required: true, required: true,
errorMessage: '请输入姓名', errorMessage: '请输入姓名',
}, }]
{
minLength: 2,
maxLength: 5,
errorMessage: '姓名长度在 {minLength} 到 {maxLength} 个字符',
}
]
}, },
consigneeMobile: { consigneeMobile: {
rules: [{ rules: [{
@ -287,13 +283,13 @@
this.attributeList = { this.attributeList = {
attributeList: JSON.stringify(obj), attributeList: JSON.stringify(obj),
productCount: this.temporaryNum, productCount: this.temporaryNum,
name:name, name: name,
price:this.purchasePrice price: this.purchasePrice
} }
for(let i=0;i<this.goodsDetail.attributeList.length;i++){ for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
this.goodsDetail.attributeList[i].isChecked = false; this.goodsDetail.attributeList[i].isChecked = false;
for (let m=0;m<this.goodsDetail.attributeList[i].value.length;m++) { for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false this.goodsDetail.attributeList[i].value[m].isChecked = false
} }
} }
@ -305,7 +301,7 @@
this.temporaryList[i] = this.attributeList this.temporaryList[i] = this.attributeList
return return
} else { } else {
if (this.temporaryList.length == (i+1)) { if (this.temporaryList.length == (i + 1)) {
this.temporaryList.push(this.attributeList); this.temporaryList.push(this.attributeList);
return return
} }
@ -316,7 +312,7 @@
}, },
temporaryChange(val) { temporaryChange(val) {
this.zNum = 0 this.zNum = 0
for (var i=0;i<this.temporaryList.length;i++) { for (var i = 0; i < this.temporaryList.length; i++) {
this.zNum += this.temporaryList[i].productCount this.zNum += this.temporaryList[i].productCount
} }
this.zPrice = this.zNum * this.purchasePrice this.zPrice = this.zNum * this.purchasePrice
@ -336,7 +332,7 @@
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
if (type == 'carPopup') { if (type == 'carPopup') {
this.$refs.carPopup.open('bottom') this.$refs.carPopup.open('bottom')
for (let i=0;i<this.carList.length;i++) { for (let i = 0; i < this.carList.length; i++) {
this.carNum += this.carList[i].num this.carNum += this.carList[i].num
} }
this.carType = this.carList.length this.carType = this.carList.length
@ -400,18 +396,18 @@
productSn: this.goodsDetail.productSn, productSn: this.goodsDetail.productSn,
productPicture: this.goodsDetail.productPicture, productPicture: this.goodsDetail.productPicture,
supplierName: this.goodsDetail.supplierName, supplierName: this.goodsDetail.supplierName,
stockLogList1:this.temporaryList, stockLogList1: this.temporaryList,
wholesalePrice:this.goodsDetail.wholesalePrice, wholesalePrice: this.goodsDetail.wholesalePrice,
lsprice:this.goodsDetail.price lsprice: this.goodsDetail.price
} }
this.carList.push(data) this.carList.push(data)
this.temporaryList = [] this.temporaryList = []
this.purchasePrice = '' this.purchasePrice = ''
this.zPrice = '' this.zPrice = ''
this.zNum = '' this.zNum = ''
for(let i=0;i<this.goodsDetail.attributeList.length;i++){ for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
this.goodsDetail.attributeList[i].isChecked = false; this.goodsDetail.attributeList[i].isChecked = false;
for (let m=0;m<this.goodsDetail.attributeList[i].value.length;m++) { for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false this.goodsDetail.attributeList[i].value[m].isChecked = false
} }
} }
@ -419,35 +415,35 @@
}, },
//删除整条商品 //删除整条商品
delShop(id){ delShop(id) {
var that = this; var that = this;
console.log(this.carList) console.log(this.carList)
for (let i=0;i<this.carList.length;i++) { for (let i = 0; i < this.carList.length; i++) {
if(this.carList[i].id == id){ if (this.carList[i].id == id) {
uni.showModal({ uni.showModal({
title: "提示", title: "提示",
content: "确定删除此条商品吗?", content: "确定删除此条商品吗?",
success: function(res) { success: function(res) {
that.carList.splice(i,1) that.carList.splice(i, 1)
} }
}) })
} }
} }
}, },
//删除商品下的某一个规格 //删除商品下的某一个规格
delShopSpec(name){ delShopSpec(name) {
var that = this; var that = this;
console.log(this.carList) console.log(this.carList)
for (let i=0;i<this.carList.length;i++) { for (let i = 0; i < this.carList.length; i++) {
for (let m=0;m<this.carList[i].stockLogList1.length;m++) { for (let m = 0; m < this.carList[i].stockLogList1.length; m++) {
if(this.carList[i].stockLogList1[m].name == name){ if (this.carList[i].stockLogList1[m].name == name) {
uni.showModal({ uni.showModal({
title: "提示", title: "提示",
content: "确定删除此条商品吗?", content: "确定删除此条商品吗?",
success: function(res) { success: function(res) {
that.carList[i].stockLogList1.splice(m,1) that.carList[i].stockLogList1.splice(m, 1)
if(that.carList[i].stockLogList1.length == 0){ if (that.carList[i].stockLogList1.length == 0) {
that.carList.splice(i,1) that.carList.splice(i, 1)
} }
} }
}) })
@ -456,27 +452,31 @@
} }
}, },
//点击底部下单按钮 //点击底部下单按钮
backPrevPage(){ backPrevPage() {
let that = this; let that = this;
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
let obj = { let obj = {
mobile:that.formData.consigneeMobile, mobile: that.formData.consigneeMobile,
username:that.formData.consigneeName, username: that.formData.consigneeName,
sale: { sale: {
area: this.addressObj.area, area: this.addressObj.area,
city: this.addressObj.city, city: this.addressObj.city,
province: this.addressObj.province, province: this.addressObj.province,
receiveAddress: that.formData.address, receiveAddress: that.formData.address,
totalAmount: that.zPrice ,//应付金额 totalAmount: that.zPrice, //应付金额
shopId:this.shopId shopId: this.shopId
}, },
saleDetailList: this.carList saleDetailList: this.carList
} }
this.tui.request("/app/sale/savePresale", "post", obj, false, false).then((res) => { this.tui.request("/app/sale/savePresale", "post", obj, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.tui.toast("下单成功,待商家配货")
setTimeout(() => {
}else{ uni.reLaunch({
url:`/pages/login/login`
})
},2000)
} else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }
}) })
@ -511,8 +511,8 @@
//点击分类获取商品列表 //点击分类获取商品列表
getShareList(id) { getShareList(id) {
this.tui.request("/app/productShare/getShareList", "POST", { this.tui.request("/app/productShare/getShareList", "POST", {
keywords:this.keywords, keywords: this.keywords,
id:id, id: id,
// id:'1717828137930330112', // id:'1717828137930330112',
pageNum: this.pageNum, pageNum: this.pageNum,
pageSize: '10' pageSize: '10'
@ -550,6 +550,17 @@
border-radius: 15px; border-radius: 15px;
} }
.address-btn {
width: 100%;
height: 80rpx;
background: #088FEB;
color: #fff;
font-size: 36rpx;
text-align: center;
line-height: 80rpx;
border-radius: 10px;
}
.popup-content { .popup-content {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -597,17 +608,27 @@
color: #646566; color: #646566;
} }
.popup-pay-title {
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-weight: bold;
font-size: 32rpx;
}
.title-box { .title-box {
background: #fff; background: #fff;
} }
.popup-pay-content{
.popup-pay-content {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 15px; padding: 0 15px 15px 15px;
width: 500rpx; width: 500rpx;
height: auto; height: auto;
background-color: #fff; background-color: #fff;
} }
.bottom-box { .bottom-box {
width: 100%; width: 100%;
position: fixed; position: fixed;

12
pages/index/index.vue

@ -20,7 +20,7 @@
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/shareStyle')"> <view class="title-btn-sbtn" @tap="goSonPage('/pages/index/shareStyle')">
<text>推款</text> <text>推款</text>
</view> </view>
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/shareStyle')"> <view class="title-btn-sbtn" @tap="goSonPage('/pages/index/waitStorageDetail')">
<text>待入库</text> <text>待入库</text>
</view> </view>
</view> </view>
@ -102,15 +102,13 @@
arrow-direction="left"></u-cell> arrow-direction="left"></u-cell>
<u-cell icon="setting-fill" url="/pages/index/shopInfo" title="修改个人信息" clickable isLink <u-cell icon="setting-fill" url="/pages/index/shopInfo" title="修改个人信息" clickable isLink
arrow-direction="left"></u-cell> arrow-direction="left"></u-cell>
<u-cell icon="integral-fill" url="/pages/index/upstream" 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/downstream" title="下游客户欠款" clickable isLink
arrow-direction="left"></u-cell> 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> 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> 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> arrow-direction="left"></u-cell>
</u-cell-group> </u-cell-group>
</view> </view>

4
pages/index/orderDetail.vue

@ -8,7 +8,7 @@
<u-collapse> <u-collapse>
<u-collapse-item :open="isReturn" v-for="(item,index) in list" :key="index" :title="item.productName" <u-collapse-item :open="isReturn" v-for="(item,index) in list" :key="index" :title="item.productName"
:name="item.saleId" :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"> <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="#5fd9ee" size="20" v-if="isReturn"></u-icon>
<u-icon name="checkmark-circle" color="#999" 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', { this.tui.request('/app/purchase/editPayPrice','post', {
id:this.sales.id, id:this.sales.id,
price:e price:e
},false,false).then(res => { },false,true).then(res => {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'

21
pages/index/shareStyle.vue

@ -7,7 +7,7 @@
<view class="content-left"> <view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="item" <view class="left-box" v-for="(item, index) in indexList" :key="item"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)"> :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> </view>
<view class="content-right"> <view class="content-right">
@ -150,8 +150,6 @@
}, },
//点击分类获取商品列表 //点击分类获取商品列表
getShareList(id) { getShareList(id) {
var that = this;
// this.shopList = []
this.tui.request("/app/product/getShareList", "POST", { this.tui.request("/app/product/getShareList", "POST", {
categoryId: id, categoryId: id,
supplierName: this.searchName, supplierName: this.searchName,
@ -159,21 +157,8 @@
pageSize: '10' pageSize: '10'
}, false, false).then((res) => { }, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
if(this.shopList == ''){ console.log(res.result.records)
for (var i = 0; i < res.result.records.length; i++) { this.shopList = res.result.records
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 { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }

44
pages/inventory/changeGoods1.vue

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

12
pages/inventory/goodsList1.vue

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

8
pages/inventory/inventory.vue

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

17
pages/login/login.vue

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

13
pages/other/custom.vue

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

Loading…
Cancel
Save