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 class="checkList" v-for="(item,index) in temporaryList" :key="index">
<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>
<uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" />
</view>
@ -183,7 +183,9 @@
storageType: '',
carNum: 0,
carType: 0,
type: ''
type: '',
productId:'',
productNum:0,
}
},
filters: {
@ -255,37 +257,47 @@
jishuqi++
}
}
if (this.goodsDetail.attributeList.length == jishuqi) {
let data = {}
this.attributeList = {
attributeList: JSON.stringify(obj),
productCount: this.temporaryNum,
name: name,
price: this.purchasePrice
}
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
this.goodsDetail.attributeList[i].isChecked = false;
for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} else {
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
}
}
}
if (this.goodsDetail.attributeList.length == jishuqi) {
this.tui.request("/app/stock/productCount", "post", {
productId: this.productId,
// productId: "1718617874370793472",
attributeList: JSON.stringify(obj)
// attributeList: '{\"颜色\":\"黑色\",\"尺码\":\"S码\",\"类别\":\"童装\"}'
}, false, true).then((res) => {
if (res.code == 200) {
this.productNum = res.result
this.attributeList = {
attributeList: JSON.stringify(obj),
productCount: this.temporaryNum,
productNum:this.productNum,
name: name,
price: this.purchasePrice
}
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
this.goodsDetail.attributeList[i].isChecked = false;
for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} else {
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.carType = this.carList.length
} else {
} else {
this.productId = item.id
this.checkGoods(item);
this.$refs.popup.open('bottom')
}

2
pages/index/addHangOrder.vue

@ -117,7 +117,7 @@
</ul>
<view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index">
<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>
<uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" />
</view>

2
pages/index/orderDetail.vue

@ -17,7 +17,7 @@
</view>
</view>
<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.productCount}}</text>
<!-- <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>
<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 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;">
<li v-for="(items,index) in goodsDetail.attributeList" :key="index">
<view class="shop-title-fur">
@ -141,7 +133,7 @@
</ul>
<view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index">
<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>
<uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" />
</view>
@ -196,7 +188,9 @@
keyList: [],
temporaryList: [],
zNum: 0,
storageType:''
storageType:'',
productNum:0,
productId:''
}
},
filters: {
@ -288,7 +282,8 @@
methods: {
scanCodeAdd() {
uni.scanCode({
success: (res) => {
success: (res) => {
this.productId = res.result
this.toggle('bottom', res.result);
},
fail: (res) => {
@ -330,37 +325,48 @@
jishuqi++
}
}
if (this.goodsDetail.attributeList.length == jishuqi) {
this.attributeList = {
attributeList: JSON.stringify(obj),
productCount: this.temporaryNum,
name: name,
price: this.purchasePrice
}
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
this.goodsDetail.attributeList[i].isChecked = false;
for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} else {
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
}
if (this.goodsDetail.attributeList.length == jishuqi) {
this.tui.request("/app/stock/productCount", "post", {
productId: this.productId,
attributeList: JSON.stringify(obj)
}, false, true).then((res) => {
if (res.code == 200) {
this.productNum = res.result
this.attributeList = {
attributeList: JSON.stringify(obj),
productCount: this.temporaryNum,
productNum:this.productNum,
name: name,
price: this.purchasePrice
}
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
this.goodsDetail.attributeList[i].isChecked = false;
for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} else {
this.temporaryList[i] = this.attributeList
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 {
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 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;">
<li v-for="(items,index) in goodsDetail.attributeList" :key="index">
<view class="title-fur">
@ -94,7 +90,7 @@
</ul>
<view class="checkList" v-for="item in temporaryList">
<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>
<uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" />
</view>
@ -184,7 +180,9 @@
zNum:0,
storageType:0,
carNum:0,
carType:0
carType:0,
productId:'',
productNum:0,
}
},
filters: {
@ -258,41 +256,50 @@
jishuqi++
}
}
if (this.goodsDetail.attributeList.length == jishuqi) {
let data = {}
this.attributeList = {
attributeList: JSON.stringify(obj),
productCount: this.temporaryNum,
name:name,
price:this.purchasePrice
}
for(let i=0;i<this.goodsDetail.attributeList.length;i++){
this.goodsDetail.attributeList[i].isChecked = false;
for (let m=0;m<this.goodsDetail.attributeList[i].value.length;m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} else {
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
}
if (this.goodsDetail.attributeList.length == jishuqi) {
this.tui.request("/app/stock/productCount", "post", {
productId: this.productId,
// productId: "1718617874370793472",
attributeList: JSON.stringify(obj)
// attributeList: '{\"颜色\":\"黑色\",\"尺码\":\"S码\",\"类别\":\"童装\"}'
}, false, true).then((res) => {
if (res.code == 200) {
this.productNum = res.result
this.attributeList = {
attributeList: JSON.stringify(obj),
productCount: this.temporaryNum,
productNum:this.productNum,
name: name,
price: this.purchasePrice
}
for(let i=0;i<this.goodsDetail.attributeList.length;i++){
this.goodsDetail.attributeList[i].isChecked = false;
for (let m=0;m<this.goodsDetail.attributeList[i].value.length;m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} 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) {
this.zNum = 0
@ -352,7 +359,8 @@
}
this.carType = this.carList.length
this.$refs.carPopup.open('bottom')
} else {
} else {
this.productId = item.id
this.checkGoods(item);
this.$refs.popup.open('bottom')
}

81
pages/inventory/goodsList1.vue

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

61
pages/other/custom.vue

@ -2,7 +2,7 @@
<view>
<uni-section class="mb-10" title="历史订单" type="line">
<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 class="shop-choose">
<view class="shop-name">
@ -23,14 +23,14 @@
</view>
<view class="uni-body">
<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 class="priceText">{{ item.noEarn }}</text>
<text class="priceText">{{ item.noEarn== null ?'暂无': item.noEarn}}</text>
</view>
<view class="uni-body">
<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 class="floatRight"> 采购退货</view>
@ -52,12 +52,12 @@
computed: mapState(['userId', 'mobile']),
data() {
return {
range: ['2023-10-1', '2023-10-2'],
range: [],
name: '',
shopList: [],
list: ['采购单', '退货单'],
current: 0,
userId:'',
current: 0,
userId: '',
shopId: '',
bList: [],
query: {
@ -66,12 +66,12 @@
}
}
},
created() {
uni.hideHomeButton() //左上角HOME按钮
const date = this.formatDate(new Date(), 'YYYY-MM-DD')
this.query.startDate = date
this.query.endDate = date
this.range = [date, date]
created() {
uni.hideHomeButton() //左上角HOME按钮
// const date = this.formatDate(new Date(), 'YYYY-MM-DD')
// this.query.startDate = date
// this.query.endDate = date
// this.range = [date, date]
this.getShopList()
this.getAllList()
},
@ -83,9 +83,6 @@
this.getAllList()
}
if (index == 1) {
this.getList()
}
if (index == 2) {
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() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR:2,
this.tui.request('/app/sale/listAll', 'post', {
remarkSR: 2,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
@ -121,8 +108,8 @@
})
},
getReturnList() {
this.tui.request('/app/sale/listAll', 'post', {
remarkSR:3,
this.tui.request('/app/sale/listAll', 'post', {
remarkSR: 3,
shopId: this.shopId,
searchDateVo: this.query
}, false, false, false).then(res => {
@ -130,9 +117,17 @@
this.bList = res.result.returnSaleList
})
},
dateChange() {
this.query.startDate = this.range[0]
this.query.endDate = this.range[1]
dateChange(e) {
console.log(e)
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)
},
formatDate(date, fmt) {

Loading…
Cancel
Save