wangfukang 3 years ago
parent
commit
5786ce6a3c
  1. 81
      pages/billing/changeGoods1.vue
  2. 2
      pages/index/addHangOrder.vue
  3. 2
      pages/index/orderDetail.vue
  4. 88
      pages/inventory/addinventory.vue
  5. 88
      pages/inventory/changeGoods1.vue
  6. 81
      pages/inventory/goodsList1.vue
  7. 61
      pages/other/custom.vue

81
pages/billing/changeGoods1.vue

@ -89,7 +89,7 @@
<view> <view>
<view class="checkList" v-for="(item,index) in temporaryList" :key="index"> <view class="checkList" v-for="(item,index) in temporaryList" :key="index">
<view class="checkList-box"> <view class="checkList-box">
{{item.name}} <text style="width: 300rpx;display: inline-block;">{{item.name}}</text> <text style="color:#777;font-size: 12px;">库存:{{item.productNum}}</text>
</view> </view>
<uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" /> <uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" />
</view> </view>
@ -183,7 +183,9 @@
storageType: '', storageType: '',
carNum: 0, carNum: 0,
carType: 0, carType: 0,
type: '' type: '',
productId:'',
productNum:0,
} }
}, },
filters: { filters: {
@ -255,37 +257,47 @@
jishuqi++ jishuqi++
} }
} }
if (this.goodsDetail.attributeList.length == jishuqi) { if (this.goodsDetail.attributeList.length == jishuqi) {
let data = {} this.tui.request("/app/stock/productCount", "post", {
this.attributeList = { productId: this.productId,
attributeList: JSON.stringify(obj), // productId: "1718617874370793472",
productCount: this.temporaryNum, attributeList: JSON.stringify(obj)
name: name, // attributeList: '{\"颜色\":\"黑色\",\"尺码\":\"S码\",\"类别\":\"童装\"}'
price: this.purchasePrice }, false, true).then((res) => {
} if (res.code == 200) {
this.productNum = res.result
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) { this.attributeList = {
this.goodsDetail.attributeList[i].isChecked = false; attributeList: JSON.stringify(obj),
for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) { productCount: this.temporaryNum,
this.goodsDetail.attributeList[i].value[m].isChecked = false productNum:this.productNum,
} name: name,
} price: this.purchasePrice
if (this.temporaryList.length == 0) { }
this.temporaryList.push(this.attributeList); for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
} else { this.goodsDetail.attributeList[i].isChecked = false;
for (var i = 0; i < this.temporaryList.length; i++) { for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) { this.goodsDetail.attributeList[i].value[m].isChecked = false
if (this.temporaryList.length == (i + 1)) { }
this.temporaryList.push(this.attributeList); }
return if (this.temporaryList.length == 0) {
} this.temporaryList.push(this.attributeList);
} else { } else {
return for (var i = 0; i < this.temporaryList.length; i++) {
} if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) {
} if (this.temporaryList.length == (i + 1)) {
this.temporaryList.push(this.attributeList);
} return
}
} else {
return
}
}
}
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
} }
}, },
@ -346,7 +358,8 @@
} }
this.$refs.carPopup.open('bottom') this.$refs.carPopup.open('bottom')
this.carType = this.carList.length this.carType = this.carList.length
} else { } else {
this.productId = item.id
this.checkGoods(item); this.checkGoods(item);
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
} }

2
pages/index/addHangOrder.vue

@ -117,7 +117,7 @@
</ul> </ul>
<view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index"> <view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index">
<view class="shop-checkList-box"> <view class="shop-checkList-box">
<text style="padding-right:40rpx;">{{item.name}}</text> 库存数:{{item.productNum}} <text style="width: 300rpx;display: inline-block;">{{item.name}}</text> <text style="color:#777;font-size: 12px;">库存:{{item.productNum}}</text>
</view> </view>
<uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" /> <uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" />
</view> </view>

2
pages/index/orderDetail.vue

@ -17,7 +17,7 @@
</view> </view>
</view> </view>
<view class="shop-type"> <view class="shop-type">
<view class="shop-collapse" v-for="(item1,index1) in item.stockLogList1" :key='index1'> <view class="shop-collapse" v-if="item1.productCount != 0" v-for="(item1,index1) in item.stockLogList1" :key='index1'>
<text>{{item1.attributeList | sliceMsg}}</text> <text>{{item1.attributeList | sliceMsg}}</text>
<text>数量:{{item1.productCount}}</text> <text>数量:{{item1.productCount}}</text>
<!-- <u-number-box integer v-if="isReturn" :max="item1.productCount - " :min="0" --> <!-- <u-number-box integer v-if="isReturn" :max="item1.productCount - " :min="0" -->

88
pages/inventory/addinventory.vue

@ -115,17 +115,9 @@
<view class="shop-popup-title-right-box" style="color: #088FEB;">{{goodsDetail.productName}} <view class="shop-popup-title-right-box" style="color: #088FEB;">{{goodsDetail.productName}}
</view> </view>
<view class="shop-popup-title-right-box">{{goodsDetail.productSn}}</view> <view class="shop-popup-title-right-box">{{goodsDetail.productSn}}</view>
<!-- <view class="popup-title-right-box" style="color: darkorange;"
@tap="inputDialogToggle('payDialog')">
<text style="margin-right:20rpx;">修改价格</text>
</view> -->
</view> </view>
</view> </view>
<view class="shop-popup-container"> <view class="shop-popup-container">
<!-- <view class="shop-purchase-price" v-if="storageType == 0">
<view style="margin-right: 20rpx;">实际价格</view>
<uni-easyinput type="text" v-model="purchasePrice" placeholder="请输入实际价格" />
</view> -->
<ul style="border-top:20rpx;"> <ul style="border-top:20rpx;">
<li v-for="(items,index) in goodsDetail.attributeList" :key="index"> <li v-for="(items,index) in goodsDetail.attributeList" :key="index">
<view class="shop-title-fur"> <view class="shop-title-fur">
@ -141,7 +133,7 @@
</ul> </ul>
<view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index"> <view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index">
<view class="shop-checkList-box"> <view class="shop-checkList-box">
{{item.name}} <text style="width: 300rpx;display: inline-block;">{{item.name}}</text> <text style="color:#777;font-size: 12px;">库存:{{item.productNum}}</text>
</view> </view>
<uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" /> <uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" />
</view> </view>
@ -196,7 +188,9 @@
keyList: [], keyList: [],
temporaryList: [], temporaryList: [],
zNum: 0, zNum: 0,
storageType:'' storageType:'',
productNum:0,
productId:''
} }
}, },
filters: { filters: {
@ -288,7 +282,8 @@
methods: { methods: {
scanCodeAdd() { scanCodeAdd() {
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
this.productId = res.result
this.toggle('bottom', res.result); this.toggle('bottom', res.result);
}, },
fail: (res) => { fail: (res) => {
@ -330,37 +325,48 @@
jishuqi++ jishuqi++
} }
} }
if (this.goodsDetail.attributeList.length == jishuqi) { if (this.goodsDetail.attributeList.length == jishuqi) {
this.attributeList = { this.tui.request("/app/stock/productCount", "post", {
attributeList: JSON.stringify(obj), productId: this.productId,
productCount: this.temporaryNum, attributeList: JSON.stringify(obj)
name: name, }, false, true).then((res) => {
price: this.purchasePrice if (res.code == 200) {
} this.productNum = res.result
this.attributeList = {
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) { attributeList: JSON.stringify(obj),
this.goodsDetail.attributeList[i].isChecked = false; productCount: this.temporaryNum,
for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) { productNum:this.productNum,
this.goodsDetail.attributeList[i].value[m].isChecked = false name: name,
} price: this.purchasePrice
} }
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList); for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
} else { this.goodsDetail.attributeList[i].isChecked = false;
for (var i = 0; i < this.temporaryList.length; i++) { for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) { this.goodsDetail.attributeList[i].value[m].isChecked = false
if (this.temporaryList.length == (i + 1)) { }
this.temporaryList.push(this.attributeList); }
return if (this.temporaryList.length == 0) {
} this.temporaryList.push(this.attributeList);
} else { } else {
this.temporaryList[i] = this.attributeList for (var i = 0; i < this.temporaryList.length; i++) {
return if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) {
if (this.temporaryList.length == (i + 1)) {
} this.temporaryList.push(this.attributeList);
} return
}
} } else {
this.temporaryList[i] = this.attributeList
return
}
}
}
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
} }

88
pages/inventory/changeGoods1.vue

@ -74,10 +74,6 @@
</view> </view>
</view> </view>
<view class="popup-container"> <view class="popup-container">
<!-- <view class="purchase-price" v-if="storageType == 0">
<view style="margin-right: 20rpx;">采购价</view>
<uni-easyinput type="text" v-model="purchasePrice" placeholder="请输入采购价" />
</view> -->
<ul style="border-top:20rpx;"> <ul style="border-top:20rpx;">
<li v-for="(items,index) in goodsDetail.attributeList" :key="index"> <li v-for="(items,index) in goodsDetail.attributeList" :key="index">
<view class="title-fur"> <view class="title-fur">
@ -94,7 +90,7 @@
</ul> </ul>
<view class="checkList" v-for="item in temporaryList"> <view class="checkList" v-for="item in temporaryList">
<view class="checkList-box"> <view class="checkList-box">
{{item.name}} <text style="width: 300rpx;display: inline-block;">{{item.name}}</text> <text style="color:#777;font-size: 12px;">库存:{{item.productNum}}</text>
</view> </view>
<uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" /> <uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" />
</view> </view>
@ -184,7 +180,9 @@
zNum:0, zNum:0,
storageType:0, storageType:0,
carNum:0, carNum:0,
carType:0 carType:0,
productId:'',
productNum:0,
} }
}, },
filters: { filters: {
@ -258,41 +256,50 @@
jishuqi++ jishuqi++
} }
} }
if (this.goodsDetail.attributeList.length == jishuqi) { if (this.goodsDetail.attributeList.length == jishuqi) {
let data = {} this.tui.request("/app/stock/productCount", "post", {
this.attributeList = { productId: this.productId,
attributeList: JSON.stringify(obj), // productId: "1718617874370793472",
productCount: this.temporaryNum, attributeList: JSON.stringify(obj)
name:name, // attributeList: '{\"颜色\":\"黑色\",\"尺码\":\"S码\",\"类别\":\"童装\"}'
price:this.purchasePrice }, false, true).then((res) => {
} if (res.code == 200) {
this.productNum = res.result
for(let i=0;i<this.goodsDetail.attributeList.length;i++){ this.attributeList = {
this.goodsDetail.attributeList[i].isChecked = false; attributeList: JSON.stringify(obj),
for (let m=0;m<this.goodsDetail.attributeList[i].value.length;m++) { productCount: this.temporaryNum,
this.goodsDetail.attributeList[i].value[m].isChecked = false productNum:this.productNum,
} name: name,
} price: this.purchasePrice
if (this.temporaryList.length == 0) { }
this.temporaryList.push(this.attributeList); for(let i=0;i<this.goodsDetail.attributeList.length;i++){
} else { this.goodsDetail.attributeList[i].isChecked = false;
for (var i = 0; i < this.temporaryList.length; i++) { for (let m=0;m<this.goodsDetail.attributeList[i].value.length;m++) {
if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) { this.goodsDetail.attributeList[i].value[m].isChecked = false
}
if (this.temporaryList.length == (i+1)) { }
this.temporaryList.push(this.attributeList); if (this.temporaryList.length == 0) {
return this.temporaryList.push(this.attributeList);
}
} else { } else {
return for (var i = 0; i < this.temporaryList.length; i++) {
if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) {
}
} if (this.temporaryList.length == (i+1)) {
this.temporaryList.push(this.attributeList);
} return
}
} else {
return
}
}
}
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
} }
}, },
temporaryChange(val) { temporaryChange(val) {
this.zNum = 0 this.zNum = 0
@ -352,7 +359,8 @@
} }
this.carType = this.carList.length this.carType = this.carList.length
this.$refs.carPopup.open('bottom') this.$refs.carPopup.open('bottom')
} else { } else {
this.productId = item.id
this.checkGoods(item); this.checkGoods(item);
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
} }

81
pages/inventory/goodsList1.vue

@ -304,7 +304,7 @@
</ul> </ul>
<view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index"> <view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index">
<view class="shop-checkList-box"> <view class="shop-checkList-box">
{{item.name}} <text style="width: 300rpx;display: inline-block;">{{item.name}}</text> <text style="color:#777;font-size: 12px;">库存:{{item.productNum}}</text>
</view> </view>
<uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" /> <uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" />
</view> </view>
@ -447,7 +447,9 @@
yNum: 150, yNum: 150,
clearMsg:'', clearMsg:'',
priceType:'', priceType:'',
multiple:1 multiple:1,
productId:'',
productNum:0,
} }
}, },
components: { components: {
@ -636,37 +638,50 @@
jishuqi++ jishuqi++
} }
} }
if (this.goodsDetail.attributeList.length == jishuqi) { if (this.goodsDetail.attributeList.length == jishuqi) {
this.attributeList = { this.tui.request("/app/stock/productCount", "post", {
attributeList: JSON.stringify(obj), productId: this.productId,
productCount: 0, // productId: "1718617874370793472",
name: name, attributeList: JSON.stringify(obj)
price: this.purchasePrice // attributeList: '{\"颜色\":\"黑色\",\"尺码\":\"S码\",\"类别\":\"童装\"}'
} }, false, true).then((res) => {
if (res.code == 200) {
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) { this.productNum = res.result
this.goodsDetail.attributeList[i].isChecked = false; this.attributeList = {
for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) { attributeList: JSON.stringify(obj),
this.goodsDetail.attributeList[i].value[m].isChecked = false productCount: 0,
} productNum:this.productNum,
} name: name,
if (this.temporaryList.length == 0) { price: this.purchasePrice
this.temporaryList.push(this.attributeList); }
} else {
for (var i = 0; i < this.temporaryList.length; i++) { for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) { this.goodsDetail.attributeList[i].isChecked = false;
if (this.temporaryList.length == (i + 1)) { for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
this.temporaryList.push(this.attributeList); this.goodsDetail.attributeList[i].value[m].isChecked = false
return }
} }
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} else { } else {
this.temporaryList[i] = this.attributeList for (var i = 0; i < this.temporaryList.length; i++) {
return if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) {
if (this.temporaryList.length == (i + 1)) {
} this.temporaryList.push(this.attributeList);
} return
}
} } else {
this.temporaryList[i] = this.attributeList
return
}
}
}
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
} }
@ -697,7 +712,7 @@
uni.setStorageSync('saoma','1') uni.setStorageSync('saoma','1')
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
this.productId = res.result
this.toggle('bottom', res.result); this.toggle('bottom', res.result);
}, },
fail: (res) => { fail: (res) => {

61
pages/other/custom.vue

@ -2,7 +2,7 @@
<view> <view>
<uni-section class="mb-10" title="历史订单" type="line"> <uni-section class="mb-10" title="历史订单" type="line">
<view class="example-body"> <view class="example-body">
<uni-datetime-picker v-model="range" type="daterange" @change="dateChange" /> <uni-datetime-picker border='false' v-model="range" type="daterange" @change="dateChange" />
</view> </view>
<view class="shop-choose"> <view class="shop-choose">
<view class="shop-name"> <view class="shop-name">
@ -23,14 +23,14 @@
</view> </view>
<view class="uni-body"> <view class="uni-body">
<text class="cardText"> 营业额:</text> <text class="cardText"> 营业额:</text>
<text class="priceText"> {{ item.realAmount }}</text> <text class="priceText"> {{ item.realAmount== null ?'暂无': item.realAmount}}</text>
<text decode class="cardText"> {{ '&nbsp;&nbsp;&nbsp;&nbsp; 欠款: ' }}</text> <text decode class="cardText"> {{ '&nbsp;&nbsp;&nbsp;&nbsp; 欠款: ' }}</text>
<text class="priceText">{{ item.noEarn }}</text> <text class="priceText">{{ item.noEarn== null ?'暂无': item.noEarn}}</text>
</view> </view>
<view class="uni-body"> <view class="uni-body">
<text class="cardText"> 订单状态:</text> <text class="cardText"> 订单状态:</text>
{{ {{
item.status == 1 ? '拣货中' : item.status == 2 ? '已预定' : item.status == 3 ? '已作废' : item.status == 4 ? '已取货' : '已送达' item.status == 1 ? '拣货中' : item.status == 2 ? '已预定' : item.status == 3 ? '已作废' : item.status == 4 ? '已取货' :item.status == 6 ? '待配货': '已送达'
}} }}
</view> </view>
<view class="floatRight"> 采购退货</view> <view class="floatRight"> 采购退货</view>
@ -52,12 +52,12 @@
computed: mapState(['userId', 'mobile']), computed: mapState(['userId', 'mobile']),
data() { data() {
return { return {
range: ['2023-10-1', '2023-10-2'], range: [],
name: '', name: '',
shopList: [], shopList: [],
list: ['采购单', '退货单'], list: ['采购单', '退货单'],
current: 0, current: 0,
userId:'', userId: '',
shopId: '', shopId: '',
bList: [], bList: [],
query: { query: {
@ -66,12 +66,12 @@
} }
} }
}, },
created() { created() {
uni.hideHomeButton() //左上角HOME按钮 uni.hideHomeButton() //左上角HOME按钮
const date = this.formatDate(new Date(), 'YYYY-MM-DD') // const date = this.formatDate(new Date(), 'YYYY-MM-DD')
this.query.startDate = date // this.query.startDate = date
this.query.endDate = date // this.query.endDate = date
this.range = [date, date] // this.range = [date, date]
this.getShopList() this.getShopList()
this.getAllList() this.getAllList()
}, },
@ -83,9 +83,6 @@
this.getAllList() this.getAllList()
} }
if (index == 1) { if (index == 1) {
this.getList()
}
if (index == 2) {
this.getReturnList() this.getReturnList()
} }
}, },
@ -100,19 +97,9 @@
}) })
}) })
}, },
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() { getAllList() {
this.tui.request('/app/sale/listAll', 'post', { this.tui.request('/app/sale/listAll', 'post', {
remarkSR:2, remarkSR: 2,
shopId: this.shopId, shopId: this.shopId,
searchDateVo: this.query searchDateVo: this.query
}, false, false, false).then(res => { }, false, false, false).then(res => {
@ -121,8 +108,8 @@
}) })
}, },
getReturnList() { getReturnList() {
this.tui.request('/app/sale/listAll', 'post', { this.tui.request('/app/sale/listAll', 'post', {
remarkSR:3, remarkSR: 3,
shopId: this.shopId, shopId: this.shopId,
searchDateVo: this.query searchDateVo: this.query
}, false, false, false).then(res => { }, false, false, false).then(res => {
@ -130,9 +117,17 @@
this.bList = res.result.returnSaleList this.bList = res.result.returnSaleList
}) })
}, },
dateChange() { dateChange(e) {
this.query.startDate = this.range[0] console.log(e)
this.query.endDate = this.range[1] if(e.length == 0){
console.log("11111")
this.query.startDate = ''
this.query.endDate = ''
}else{
this.query.startDate = this.range[0]
this.query.endDate = this.range[1]
}
this.sectionChange(this.current) this.sectionChange(this.current)
}, },
formatDate(date, fmt) { formatDate(date, fmt) {

Loading…
Cancel
Save