wangfukang 3 years ago
parent
commit
0fa5a94582
  1. BIN
      pages/.DS_Store
  2. BIN
      pages/index/.DS_Store
  3. BIN
      pages/inventory/.DS_Store
  4. 1746
      pages/inventory/AIInventory.vue
  5. 355
      pages/inventory/addGoods.vue
  6. 19
      pages/inventory/attribute.vue
  7. 675
      pages/inventory/batchPrint.vue
  8. 12
      pages/inventory/brand.vue
  9. 2
      pages/inventory/changeGoods1.vue
  10. 313
      pages/inventory/getProductIdToList.vue
  11. 6
      pages/inventory/inventory.vue
  12. 2
      pages/inventory/inventoryConfirm.vue
  13. 8
      pages/inventory/inventoryDetail.vue
  14. 112
      pages/inventory/inventoryWarn.vue

BIN
pages/.DS_Store

Binary file not shown.

BIN
pages/index/.DS_Store

Binary file not shown.

BIN
pages/inventory/.DS_Store

Binary file not shown.

1746
pages/inventory/AIInventory.vue

File diff suppressed because it is too large

355
pages/inventory/addGoods.vue

@ -1,355 +0,0 @@
<!-- 底部菜单--库存--新增商品 -->
<template>
<view>
<view class="formBox">
<uni-forms ref="form" :modelValue="formData" :rules="rules" labelWidth="85px">
<uni-forms-item label="商品名称" name="productName" required>
<uni-easyinput type="text" v-model="formData.productName" placeholder="请输入商品名称" trim="all" />
</uni-forms-item>
<uni-forms-item label="商品图片" name="productPicture">
<view v-if="formData.productPicture !=''">
<img :src="formData.productPicture" alt="" class="upload-img">
</view>
<u-upload :fileList="formData.productPicture" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="1"></u-upload>
</uni-forms-item>
<uni-forms-item label="货号" name="productSn" required>
<uni-easyinput type="text" v-model="formData.productSn" @blur="getSnIsRepeat" placeholder="请输入货号" trim="all" />
</uni-forms-item>
<uni-forms-item label="商品条码" name="barcode">
<uni-easyinput type="text" v-model="formData.barcode" placeholder="可以扫码商品条码添加" trim="all" />
<u-icon name="camera" size="36" @tap.stop='scanCodeAdd'></u-icon>
</uni-forms-item>
<uni-forms-item label="批发价" name="wholesalePrice" required>
<uni-easyinput type="digit" v-model="formData.wholesalePrice" placeholder="请输入批发价" trim="all" />
</uni-forms-item>
<uni-forms-item label="市场价" name="price" required>
<uni-easyinput type="digit" v-model="formData.price" placeholder="请输入零售价" trim="all" />
</uni-forms-item>
<uni-forms-item label="分类" name="categoryId" required v-if="dataList == ''">
<!-- <uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.categoryId"
placeholder="请选择分类" @change="categoryChange(formData.categoryId)"></uni-data-select> -->
<view class="content-list">
<view class="list-val">
<input type="text" placeholder="请选择分类" disabled :value="typeItem.categoryName"
style="border-bottom: 1px solid #fff;text-align: center;"
@tap="goGategoryLow">
<uni-icons type="right" size="16"
style="margin-left: 40rpx;line-height: 70rpx;"></uni-icons>
</view>
</view>
</uni-forms-item>
<uni-forms-item label="尾货预警" name="salesWeek">
<!-- <uni-easyinput type="digit" v-model="formData.salesWeek" placeholder="请输入零售价" trim="all" /> -->
<uni-datetime-picker type="date" :clear-icon="false" v-model="formData.salesWeek" />
</uni-forms-item>
<uni-forms-item label="库存预警" name="tailWarn">
<uni-easyinput type="digit" v-model="formData.tailWarn" placeholder="请设置库存预警最低件数" trim="all" />
</uni-forms-item>
<uni-forms-item label="货品简介" name="productIntro">
<uni-easyinput type="textarea" autoHeight v-model="formData.productIntro" placeholder="请输入货品简介"
trim="all" />
</uni-forms-item>
</uni-forms>
<view v-if="type == 'edit'" style="display: flex;">
<button @tap.stop="submit()" style="width: 95%;">保存</button>
</view>
<view v-else>
<button @tap.stop="submit()">保存</button>
</view>
</view>
<!-- <u-modal v-model="show" :content="content"></u-modal> -->
</view>
</template>
<script>
export default {
data() {
return {
fileList1: [],
formData: {
productName: '',
price: '',
productSn: '',
wholesalePrice: '',
productPicture: [],
productIntro: '',
categoryId: '',
salesWeek: '',
tailWarn: '',
barcode:''
},
categoryList: [],
productId:'',
arrtList: [],
typeItem:{},
arrtChange: [],
categoryId:'',
dataList:[],
type:'add',
rules: {
categoryId: {
rules: [{
required: true,
errorMessage: '请选择商品分类',
}, ],
},
price: {
rules: [{
required: true,
errorMessage: '请填写市场价',
}, ],
},
wholesalePrice: {
rules: [{
required: true,
errorMessage: '请填写批发价',
}, ],
},
productSn: {
rules: [{
required: true,
errorMessage: '请填写货号',
}, ],
},
productName: {
rules: [{
required: true,
errorMessage: '请填写商品名称',
}, ],
}
// tailWarn: {
// rules: [{
// required: true,
// errorMessage: '请填写库存预警天数',
// }, ],
// },
// salesWeek: {
// rules: [{
// required: true,
// errorMessage: '请选择尾货预警天数',
// }, ],
// }
}
}
},
onShow(){
let that = this;
this.typeItem = JSON.parse(JSON.stringify(this.typeItem)) || ''
if(this.typeItem){
this.formData.categoryId = this.typeItem.id
}
},
onLoad(option) {
if(option.dataList){
this.type = 'edit'
this.dataList = JSON.parse(option.dataList)
this.formData.productName = this.dataList.productName
this.formData.barcode = this.dataList.barcode
this.formData.price = this.dataList.price
this.formData.productSn = this.dataList.productSn
this.formData.wholesalePrice = this.dataList.wholesalePrice
this.formData.productPicture = this.dataList.productPicture
this.formData.productIntro = this.dataList.productIntro
this.formData.categoryId = this.dataList.categoryId
this.formData.salesWeek = this.dataList.salesWeek
this.formData.tailWarn = this.dataList.tailWarn
}
},
methods: {
// 删除图片
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
// 新增图片
async afterRead(event) {
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file)
if (this.formData.productPicture == undefined) this.formData.productPicture = [];
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: 'https://storage.xenjoyou.com/hiver/upload/file',
filePath: url,
name: 'file',
header: {
"content-type": "multipart/form-data",
'accessToken': this.tui.getToken()
},
formData: {},
success: (uploadFileRes) => {
let path = JSON.parse(uploadFileRes.data)
//后端返回的地址,存入图片地址
this.formData.productPicture = path.result
}
});
})
},
categoryChange(e) {
this.categoryId = e
},
//货号是否重复
getSnIsRepeat(){
this.tui.request('/app/product/getByProductSn', "post", {
productSn:this.formData.productSn
}, false, true).then((res1) => {
if (res1.code == 200) {
if(res1.result != ''){
this.tui.toast('当前货号已被商品:“'+res1.result[0].productName+'”占用,请重新输入')
this.formData.productSn = ''
}
}
})
},
// 触发提交表单
submit() {
let that = this;
let url = ''
this.$refs.form.validate().then(res => {
if(that.dataList !=''){
url = '/app/product/edit'
res.id = that.dataList.id
}else{
url = '/app/product/save'
}
if(res.productPicture == ''){
res.productPicture = ''
}
that.tui.request(url, "post", res, false, false).then((res1) => {
if (res1.code == 200) {
uni.navigateBack({
delta: 1
})
} else {
uni.showToast({
title: "添加失败",
icon: 'none'
})
}
})
}).catch(err => {
})
},
//跳转分类页
goGategoryLow() {
uni.navigateTo({
url: '/pages/inventory/gategory'
})
},
scanCodeAdd() {
let that = this;
uni.scanCode({
scanType: ['barCode'],
success: (res) => {
console.log(res)
that.tui.request('/app/product/getByBarcode', "post", {
barcode:res.result
}, false, true).then((res1) => {
if (res1.code == 200) {
if(res1.result != ''){
that.tui.toast('当前条码已被商品:“'+res1.result[0].productName+'”占用,请重新输入')
}else{
that.formData.barcode = res.result;
}
}
})
},
fail: (res) => {
uni.showToast({
title: '扫描失败',
icon: 'none'
})
}
})
}
}
}
</script>
<style lang="scss">
.list-val {
width: 486rpx;
height: 70rpx;
line-height: 70rpx;
}
.list-val input {
width: 400rpx;
height: 70rpx;
display: inline-block;
line-height: 70rpx;
text-align: left !important;
padding-left: 20rpx;
float: left;
font-size: 25rpx;
}
.formBox {
margin: 20rpx;
padding: 20rpx 26rpx;
border-radius: 14rpx;
box-shadow: 0px 1px 10px 2px #e2e2e2;
background-color: #fff;
.uni-data-select {
width: 100%;
}
.attrs {
text {
display: inline-block;
border: 1px solid $u-primary;
padding: 7px 20rpx;
margin: 20rpx;
background-color: #fff;
color: $u-primary;
}
.checkedText {
background-color: $u-primary;
color: #fff;
}
}
}
.upload-img{
width: 160rpx;
height: 160rpx;
}
.content-list {
height: 70rpx;
border: 1px solid #eee;
}
button{
height: 90rpx;
line-height: 90rpx;
font-size: 36rpx;
color: #fff;
background: #5fd9ee;
border-radius: 10px;
}
</style>

19
pages/inventory/attribute.vue

@ -1,19 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

675
pages/inventory/batchPrint.vue

@ -1,675 +0,0 @@
<template>
<view class="page1">
<!-- <view class="title-box">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="请输入商品名称" cancelButton="none" @confirm="search" />
</view> -->
<view class="content-box" :style="{height:height - 120 + 'rpx'}" v-if="purchase != ''">
<view class="content-right">
<view class="right-box" v-for="(item,index) in goodsList" :key="index">
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name">{{item.productName}}</view>
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price" v-if="item.wholesalePrice">
<view class="price-box">
<text>{{item.wholesalePrice}}</text>
<text>批发价</text>
</view>
<view class="price-box">
<text>{{item.lsprice}}</text>
<tclass售价</text>
</view>
</view>
</view>
<checkbox-group @tap="goInvPrint(item)" v-if="item.wholesalePrice">
<label>
<checkbox :checked="item.checked" class="checkbox" />
</label>
</checkbox-group>
</view>
</view>
</view>
<view class="content-box" :style="{height:height - 120 + 'rpx'}" v-else>
<view class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="index"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<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">
<view class="right-box" v-for="(item,index) in goodsList" :key="index" v-if="item.delFlag">
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name">{{item.productName}}</view>
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price" v-if="item.wholesalePrice">
<view class="price-box">
<text>{{item.wholesalePrice}}</text>
<text>批发价</text>
</view>
<view class="price-box">
<text>{{item.price}}</text>
<text>零售价</text>
</view>
</view>
</view>
<checkbox-group @tap="checkboxChange(item)" v-if="item.wholesalePrice">
<label>
<checkbox :checked="item.checked" class="checkbox" />
</label>
</checkbox-group>
</view>
</view>
</view>
<view class="bottom-box">
<view class="bottom-right">
<button class="bottom-btn" @tap="clickPrint">批量打印</button>
</view>
</view>
<!-- 弹出输入框 -->
<uni-popup ref="payDialog" background-color="#fff">
<view class="popup-pay-content">
<view class="popup-pay-title">
<text>已选商品</text>
</view>
<view v-for="(item,index) in carList">
<view class="box-right">
<text class="box-right-name" style="font-size: 24rpx;">{{item.productName}}</text>
<text class="box-right-num">({{item.productSn}})</text>
</view>
</view>
<view class="popup-pay-title" style="margin-top: 50rpx;">
<text>请选择需要打印的字段</text>
</view>
<view class="content-fur">
<view class="content-low" v-for="(item1,index1) in list" :key="index1"
@tap.stop="addMultipleType(item1)" :class="item1.checked?'checked':''">{{item1.type}}</view>
</view>
<view class="popup-pay-container" >
<kk-printer ref="kkprinter" :bufferData="bufferData" @goPrint="goPrint" :defaultText="'确认打印'"></kk-printer>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import util from '@/components/kk-printer/utils/util.js';
import * as blesdk from '@/components/kk-printer/utils/bluetoolth.js';
import kkPrinter from '@/components/kk-printer/index.vue';
export default {
data() {
return {
indexList: [],
pageNum: 1, //分页的页码
shopList: [],
goodsList: [],
categoryId: '', //分类id
searchName: '', //搜索框输入值
id: '',
carList: [],
type: '',
bufferData:[],
checkPayData:'',
data:{},
height:0,
list:[{
type:'供应商',
checked:false,
},{
type:'货号',
checked:false,
},{
type:'零售价',
checked:false,
},{
type:'批发价',
checked:false,
}],
multipleList:[],
purchase:''
}
},
components: {
kkPrinter
},
onLoad(options) {
this.height = wx.getSystemInfoSync().windowHeight
if (options.khid != undefined) {
uni.redirectTo({
url: "/pages/index/downStearmList?khid=" + options.khid
})
}else{
if(options.purchase){
this.purchase = JSON.parse(options.purchase)
this.goodsList = JSON.parse(options.purchaseDetails)
console.log("新增入库打印");
console.log(this.goodsList);
}else{
console.log("普通批量打印");
this.type = uni.getStorageSync('type')
this.getGategoryList()
}
}
},
methods: {
//初始化获取分类列表
getGategoryList() {
this.shopList = []
this.indexList = []
this.goodsList = []
this.tui.request("/app/productCategory/list", "get", {}, false, true).then((res) => {
if (res.code == 200) {
this.indexList = res.result;
for (var i = 0; i < this.indexList.length; i++) {
if (i == 0) {
this.indexList[i].parentId = true
} else {
this.indexList[i].parentId = false
}
let data = {
categoryId: this.indexList[i].id
}
this.shopList.push(data)
this.categoryId = this.indexList[i].id
this.getShareList(this.indexList[i].id)
}
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
//点击分类获取商品列表
getShareList(id) {
this.tui.request("/app/product/getShareList", "POST", {
categoryId: id,
searchStr: this.searchName,
pageNum: this.pageNum,
pageSize: '100'
}, false, false).then((res) => {
if (res.code == 200) {
for (var i = 0; i < this.shopList.length; i++) {
if(res.result.records != []){
if(this.shopList[i].categoryId == res.result.records[0].categoryId){
this.shopList[i] = res.result.records
}
}else{
this.shopList[i] = []
}
}
this.goodsList = this.shopList[0]
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
//顶部搜索框
search(res) {
this.searchName = res.value
this.getGategoryList()
},
//未入库遮罩
clickMask() {
uni.showToast({
title: '请将商品上架或入库后再操作!',
icon: 'none'
})
},
//点击左侧菜单切换
clickLeftBtn(index) {
for (var i = 0; i < this.indexList.length; i++) {
if (i == index) {
this.indexList[i].parentId = true
} else {
this.indexList[i].parentId = false
}
}
this.categoryId = this.shopList[index].id
this.goodsList = this.shopList[index]
},
goInvPrint(item){
item.checked = !item.checked
if(this.carList == ''){
this.carList.push(item)
}else{
for(let i=0;i<this.carList.length;i++){
if(this.carList[i].productId == item.productId){
this.carList.splice(i, 1)
return;
}else{
if(i+1 == this.carList.length){
this.carList.push(item)
return;
}
}
}
}
console.log(this.carList)
},
//选中商品
checkboxChange(item) {
item.checked = !item.checked
if(this.carList == ''){
this.carList.push(item)
}else{
for(let i=0;i<this.carList.length;i++){
if(this.carList[i].id == item.id){
this.carList.splice(i, 1)
return;
}else{
if(i+1 == this.carList.length){
this.carList.push(item)
return;
}
}
}
}
console.log(this.carList)
},
//点击批量打印按钮
clickPrint() {
this.$refs.payDialog.open('center')
},
checkPay(type){
this.data.priceType = type
this.tui.request("/app/productShare/save", "POST", this.data, false, true).then((res) => {
if (res.code == 200) {
this.khid = res.result.id
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
this.checkPayData = type
this.$refs.payDialog.close()
this.$refs.share.open()
},
//选择多个规格保存
addMultipleType(item1){
item1.checked = !item1.checked
if(this.multipleList == ''){
this.multipleList.push(item1.type)
}else{
for(var i=0;i<this.multipleList.length;i++){
if(this.multipleList[i] == item1.type){ //相同
this.multipleList.splice(i,1)
return;
}else{ //不同
if(i+1 == this.multipleList.length){
this.multipleList.push(item1.type)
return;
}
}
}
}
console.log(this.multipleList);
},
//点击打印按钮
goPrint(){
uni.setStorageSync('small',true)
let that = this;
for(var i=0;i<that.carList.length;i++){
let item = that.carList[i]
let strCmd = blesdk.CreatCPCLPage(440, 320, 1, 0);
strCmd += blesdk.addCPCLText('0', '30', '24', '0', 0, '商品名:'+item.productName)
if(this.multipleList.indexOf('货号') != -1){
console.log(this.multipleList.indexOf('货号'))
strCmd += blesdk.addCPCLText('0', '80', '24', '0', 0, '货 号:'+item.productSn)
}
if(this.multipleList.indexOf('供应商') != -1){
console.log(this.multipleList.indexOf('供应商'))
strCmd += blesdk.addCPCLText('0', '130', '24', '0', 0, '供应商:'+(this.purchase !=''?this.purchase.supplierName:item.supplierName))
}
if(this.multipleList.indexOf('批发价') != -1){
console.log(this.multipleList.indexOf('批发价'))
strCmd += blesdk.addCPCLText('0', '180', '24', '0', 0, '批发价:'+item.wholesalePrice)
}
if(this.multipleList.indexOf('零售价') != -1){
console.log(this.multipleList.indexOf('零售价'))
strCmd += blesdk.addCPCLText('0', '230', '24', '0', 0, '零售价:'+(this.purchase !=''?item.lsprice:item.price))
}
strCmd += blesdk.addCPCLQRCode(200, 140, 'H', '1', 6, [item.id,item.shopId]) //二维码
strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中
strCmd += blesdk.addCPCLPrint();
this.bufferData.push(strCmd);
this.$refs.payDialog.close();
}
}
}
}
</script>
<style lang="scss">
page {
height: 100%;
}
.page1 {
display: flex;
flex-direction: column;
height: 92%;
}
.uni-tab__dot {
padding: 0 4px;
line-height: 15px;
color: #ffffff;
text-align: center;
font-size: 12px;
background-color: #ff0000;
border-radius: 15px;
}
.uni-tab__text {
font-size: 12px;
color: #646566;
}
.title-box {
background: #fff;
position: fixed;
z-index: 99;
width: 100%;
top: 0;
}
.bottom-box {
width: 100%;
height: 120rpx;
position: fixed;
bottom: 0;
display: flex;
background: #fff;
z-index: 98;
}
.bottom-left {
width: 15%;
position: relative;
}
.bottom-right {
width: 100%;
display: flex;
.bottom-btn {
margin: 0 auto;
padding: 0;
width: 90%;
line-height: 80rpx;
height: 80rpx;
text-align: center;
margin-top: 10rpx;
color: #fff;
font-size: 28rpx;
background: linear-gradient(90deg, #60F3FF, #088FEB);
border-radius: 5px;
}
}
.bottom-left-box {
display: flex;
flex-direction: column;
text-align: center;
}
.content-box {
background: #fff;
flex: 1;
display: flex;
overflow: scroll;
}
.content-left {
width: 170rpx;
background: #eee;
height: 100%;
overflow: scroll;
}
.left-box {
width: 100%;
height: 90rpx;
font-size: 30rpx;
text-align: center;
line-height: 90rpx;
border-bottom: 1px solid #fff;
}
.left-box-hover {
width: 100%;
height: 90rpx;
font-size: 30rpx;
text-align: center;
line-height: 90rpx;
border-bottom: 1px solid #fff;
background-color: #fff;
}
.red {
border-right: 3px solid red;
}
.content-right {
flex: 1;
overflow-y: scroll;
}
.right-box {
width: 100%;
height: 190rpx;
display: flex;
border-bottom: 1px solid #eee;
position: relative;
}
.box-left {
width: 130rpx;
height: 131rpx;
background-size: 100%;
margin: 25rpx 30rpx 35rpx 10rpx;
border-radius: 20rpx;
}
.box-left img {
width: 100%;
height: 100%;
}
.box-right {
margin-top: 17rpx;
}
.box-right-name {
font-size: 30rpx;
font-weight: bold;
}
.box-right-num {
padding: 5rpx 0;
color: #777;
}
.box-right-price {
display: flex;
font-size: 25rpx;
}
.checkbox {
width: 40rpx;
height: 40rpx;
position: absolute;
top: 20rpx;
right: 30rpx;
}
.price-box {
display: flex;
flex-direction: column;
margin-right: 20rpx;
}
.price-box text:first-child {
color: #ffa200
}
.uni-tab__cart-button-right,
.uni-tab__cart-sub-right {
display: none;
flex: none;
}
.popup-content {
align-items: center;
justify-content: center;
padding: 15px;
height: 1200rpx;
background-color: #fff;
margin-bottom: 30rpx;
overflow: scroll;
}
.popup-title-right-box {
height: 50rpx;
line-height: 50rpx;
}
.popup-title-right {
width: 400rpx;
margin-left: 30rpx;
}
.popup-title-left {
width: 150rpx;
height: 150rpx;
}
.popup-title-left image {
width: 150rpx;
height: 150rpx;
}
.popup-title {
display: flex;
height: 180rpx;
border-bottom: 1px solid #eee;
margin-top: 20rpx;
}
.popup-bottom {
width: 95%;
height: 100rpx;
position: fixed;
bottom: 0;
left: 2.5%;
display: flex;
z-index: 99;
background: #fff;
}
.popup-bottom-left {
width: 50%;
line-height: 80rpx;
}
.popup-bottom-right {
width: 50%;
line-height: 100rpx;
.bottom-btn {
width: 70%;
line-height: 35px;
height: 70rpx;
text-align: center;
/* margin-top: 10rpx; */
color: #fff;
font-size: 28rpx;
margin: 0 auto;
background: linear-gradient(90deg, #60F3FF, #088FEB);
border-radius: 70rpx;
}
}
.shop-mask {
width: 100%;
height: 190rpx;
position: absolute;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.1);
z-index: 99;
}
.popup-pay-content {
align-items: center;
justify-content: center;
padding: 15px;
width: 500rpx;
height: auto;
max-height: 1000rpx;
overflow: scroll;
background-color: #fff;
}
.popup-pay-title {
font-size: 30rpx;
font-weight: bold;
text-align: center;
position: relative;
border-bottom: 1px solid #eee;
padding-bottom: 20rpx;
}
.popup-pay-container {
margin-top: 20rpx;
height: 100rpx;
border-radius: 10px;
background: #088FEB;
line-height: 100rpx;
text-align: center;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
color: #fff;
}
.noPic{
border-radius: 10px;
width: 150rpx;
height: 150rpx;
text-align: center;
line-height: 140rpx;
color: #777;
background: #eee;
}
.checked{
background: #60F3FF;
color: #fff !important;
}
.content-fur {
padding-bottom: 25rpx;
}
.content-low {
width: auto;
border: 1px solid #eee;
display: inline-block;
min-width: 90rpx;
padding: 5rpx;
font-size: 35rpx;
text-align: center;
color: #777;
margin: 20rpx 0 0 20rpx;
}
</style>

12
pages/inventory/brand.vue

@ -1,12 +0,0 @@
<template>
<view>
<uni-card title="">
</uni-card>
</view>
</template>
<script>
</script>
<style>
</style>

2
pages/inventory/changeGoods1.vue

@ -506,7 +506,7 @@
//跳转新增商品
goAddGoods() {
uni.navigateTo({
url: "/pages/inventory/addGoods"
url: "/package1/inventory/addGoods"
})
},
//弹出购物车或者商品规格选择弹窗

313
pages/inventory/getProductIdToList.vue

@ -1,313 +0,0 @@
<template>
<view class="container">
<view class="tui-order-item boxbg">
<view class="shop-box" v-for="(item,index) in list" :key="index" v-if="type==0">
<uni-card :title="'时间:'+ item.createTime" :sub-title="item.userName == null ?'暂无':item.userName">
<view class="uni-body" style="text-align: center;">单价:{{item.saleDetailDTOList[0].discountAmount}} 数量:{{item.productCount}}</view>
<view style="margin: 5px 0;height: 1px;background: #eee;"></view>
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;">
<view style="width: 49%;text-align: center;border-right: 1px solid #eee;">商品规格</view>
<view style="width: 50%;text-align: center;">总数量</view>
</view>
<view v-for="(items,index1) in item.saleDetailDTOList">
<view v-for="(data,index2) in items.stockLogList1" style='height: 50rpx;line-height: 50rpx;'>
<view style="width: 49%;text-align: center;border-right: 1px solid #eee;float: left;">
{{data.attributeList | sliceMsg}}
</view>
<view style="width: 50%;text-align: center;float: left;">
{{data.productCount}}
</view>
</view>
</view>
</uni-card>
</view>
<view class="shop-box" v-for="(item,index3) in list" :key="index3" v-else>
<uni-card :title="'供应商:'+ (item.purchase.supplierName?item.purchase.supplierName:'暂无')"
:sub-title="item.purchase.createTime?item.purchase.createTime:'暂无'" >
<view class="uni-body" style="text-align: center;"><text v-if="userType==0">采购价:{{item.purchaseDetails[0].purchasePrice?item.purchaseDetails[0].purchasePrice:'暂无'}}</text> 总数量:{{item.purchase.totalAmount?item.purchase.totalAmount:'暂无'}}</view>
<view style="margin: 5px 0;height: 1px;background: #eee;"></view>
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;">
<view style="width: 49%;text-align: center;border-right: 1px solid #eee;">商品规格</view>
<view style="width: 50%;text-align: center;">总数量</view>
</view>
<view v-for="(items,index1) in item.purchaseDetails">
<view v-for="(data,index2) in items.stockLogList1" style='height: 50rpx;line-height: 50rpx;'>
<view style="width: 49%;text-align: center;border-right: 1px solid #eee;float: left;">
{{data.attributeList | sliceMsg}}
</view>
<view style="width: 50%;text-align: center;float: left;">
{{data.productCount}}
</view>
</view>
</view>
</uni-card>
</view>
</view>
<u-loadmore :status="status" />
</view>
</template>
<script>
export default {
data() {
return {
list:[],
status: 'loadmore',
pages: 1,
pageNum: 1,
productId:'',
type:'',
userType:''
}
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name += newObj[as] + '/'
}
}
return name;
}
},
onLoad(option) {
this.productId = option.id
this.userType = uni.getStorageSync('type')
this.type = option.type
this.getWaitStorage()
},
onReachBottom() {
if (this.pages >= this.pageNum) return;
this.status = 'loading';
this.pages = ++this.pages;
this.getWaitStorage();
},
methods: {
getWaitStorage(id) {
this.status = 'loading';
var url;
if(this.type==0){ //销售
url = "/app/sale/getSaleListByProductId"
}else{ //入库
url = "/app/purchase/getPurchaseListByProductId"
}
this.tui.request(url, "post", {
productId: this.productId,
pageSize: 10,
pageNum: this.pageNum
}, false, false).then((res) => {
this.status = 'nomore';
if (res.code == 200) {
// this.list = res.result.records
if (this.pages == 1) {
this.list = res.result.records
} else {
this.list = [...this.list, ...res.result.records]
}
this.pageNum = res.result.pages
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
}
},
}
</script>
<style lang="scss">
.uni-card__header-box{
text-align: center !important;
}
.uni-card__header-content-title{
font-weight: bold;
}
.container {
padding-bottom: 118rpx;
.boxbg {
padding-top: 10rpx;
background-color: #fff;
margin: 30upx;
border-radius: 10upx;
box-shadow: 0px 1px 10px 2px #e2e2e2;
}
.tui-order-item {
.u-collapse-content {
display: flex;
justify-content: space-between;
line-height: 30px;
}
.tui-goods-info {
width: 100%;
box-sizing: border-box;
background: #fff;
line-height: 26px;
border-top: 10px solid #eee;
.tui-price-flex {
display: flex;
align-items: center;
justify-content: space-between;
}
.tui-size32 {
font-size: 32rpx;
font-weight: 500;
}
.tui-size-24 {
font-size: 24rpx;
}
.tui-price-large {
font-size: 32rpx;
.lineText {
text-decoration: line-through;
font-size: 12px;
color: #888;
}
}
.tui-flex-shrink {
flex-shrink: 0;
}
.tui-goods-price {
width: 100%;
display: flex;
align-items: flex-end;
justify-content: flex-end;
font-size: 24rpx;
}
.tui-primary-color {
color: #EB0909;
}
.tui-pbtm20 {
padding-bottom: 20rpx;
}
}
}
}
.tui-tabbar {
width: 100%;
height: 98rpx;
background: #fff;
position: fixed;
left: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 26rpx;
box-shadow: 0 0 1px rgba(0, 0, 0, .3);
padding-bottom: env(safe-area-inset-bottom);
z-index: 996;
}
.tui-btn-mr {
width:130rpx;
height: 60rpx;
background: #088FEB;
color: #fff;
border-radius: 10px;
line-height: 60rpx;
text-align: center;
margin-right: 30rpx;
}
.shop-box {
width: 95%;
margin: 0 auto;
position: relative;
}
.shop-name {
width: 100%;
height: 200rpx;
line-height: 80rpx;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
font-size: 28rpx;
font-weight: bold;
display: flex;
.uni-icons {
color: #088FEB !important;
}
}
.shop-productName {
flex: 1;
display: flex;
flex-direction: column;
padding-left: 20rpx;
}
.shop-productName view {
height: 55rpx;
}
.shop-collapse {
display: flex;
height: 80rpx;
font-size: 26rpx;
line-height: 80rpx;
}
.shop-collapse text {
flex: 1;
text-align: center;
padding-right: 40rpx;
border-right: 1px solid #eee;
}
.content-list {
width: 95%;
margin: 0 auto;
display: flex;
height: 80rpx;
border-bottom: 1px solid #eee;
}
.content-list:last-child {
border-bottom: none;
height: auto;
}
.list-name {
width: 200rpx;
text-align: left;
line-height: 40px;
height: 80rpx;
padding-left: 20rpx;
}
.list-val {
width: 560rpx;
height: 80rpx;
line-height: 80rpx;
}
.list-val input {
width: 400rpx;
height: 60rpx;
display: inline-block;
line-height: 60rpx;
float: left;
margin-top: 10rpx;
padding-left: 20rpx;
border-bottom: 1px solid #088FEB;
}
textarea {
margin: 20rpx;
border: 1px solid #eee;
height: 150rpx;
width: 500rpx;
}
</style>

6
pages/inventory/inventory.vue

@ -188,7 +188,7 @@
},
goWarnList(){
uni.navigateTo({
url: '/pages/inventory/inventoryWarn'
url: '/package1/inventory/inventoryWarn'
})
},
//点击分类获取商品列表
@ -261,13 +261,13 @@
})
} else if (target == '2') {
uni.navigateTo({
url: "/pages/inventory/addGoods"
url: "/package1/inventory/addGoods"
})
}else if(target == '3'){
this.$refs.payDialog.open('center')
}else{
uni.navigateTo({
url: "/pages/inventory/batchPrint"
url: "/package1/inventory/batchPrint"
})
}
}

2
pages/inventory/inventoryConfirm.vue

@ -129,7 +129,7 @@
},
batchPrint(){
uni.navigateTo({
url: "/pages/inventory/batchPrint?purchase=" + JSON.stringify(this.purchase) + '&purchaseDetails=' + JSON.stringify(this.purchaseDetails)
url: "/package1/inventory/batchPrint?purchase=" + JSON.stringify(this.purchase) + '&purchaseDetails=' + JSON.stringify(this.purchaseDetails)
})
}
},

8
pages/inventory/inventoryDetail.vue

@ -189,7 +189,7 @@
//去新增商品页编辑
goToAddGoods(){
uni.navigateTo({
url: "/pages/inventory/addGoods?dataList="+JSON.stringify(this.dataList)
url: "/package1/inventory/addGoods?dataList="+JSON.stringify(this.dataList)
})
},
onPrint(opt) {
@ -221,11 +221,11 @@
trigger(e) {
if(e.index==0){ //销售明细
uni.navigateTo({
url: '/pages/inventory/getProductIdToList?type=0&id=' + this.dataList.id
url: '/package1/inventory/getProductIdToList?type=0&id=' + this.dataList.id
})
}else if(e.index==1){
uni.navigateTo({
url: '/pages/inventory/getProductIdToList?type=1&id=' + this.dataList.id
url: '/package1/inventory/getProductIdToList?type=1&id=' + this.dataList.id
})
}else{
this.delGoods()
@ -241,7 +241,7 @@
if(res.confirm){
that.tui.request('/app/product/delById', "post", {
id:that.dataList.id
}, false, false).then((res1) => {
}, false, true).then((res1) => {
if (res1.code == 200) {
uni.navigateBack({
delta: 1

112
pages/inventory/inventoryWarn.vue

@ -1,112 +0,0 @@
<template>
<view class="container">
<view class="shop-box" style="border-top:5px solid #eee;" v-for="(item,index) in shopList" :key="index">
<view class="shop-name" style="position: relative;">
<img class="img-radius" :src="item.productPicture" alt=""
style="width: 140rpx;height: 140rpx;margin: 30rpx 0 0 30rpx;" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
<view class="shop-productName">
<view style="color:#FF5809;">{{item.productName}}
({{item.productSn == null ? '暂无':item.productSn}})
</view>
<view>库存总数:{{item.stockCount == null ? '暂无':item.stockCount}}</view>
<view>
预警值:{{item.tailWarn == null ? '暂无':item.tailWarn}}
</view>
</view>
</view>
<view class="shop-type">
<view class="shop-collapse"
v-for="(item1,index1) in item.stockAttributeVoList" :key='index1'>
<text>{{item1.attributeList | sliceMsg}}</text>
<text>数量:{{item1.stockCount}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
shopList: []
}
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name += newObj[as] + '/'
}
}
return name;
}
},
onLoad() {
this.warnList()
},
methods: {
warnList(){
this.tui.request('/app/stock/getTailWarnProduct', 'post', {}, false, false).then(res => {
if(res.code == 200){
this.shopList = res.result
}
})
}
},
}
</script>
<style lang="scss">
.container {
padding-bottom: 118rpx;
background: #fff;
}
.shop-box {
width: 95%;
margin: 0 auto;
}
.shop-name {
width: 100%;
height: 200rpx;
line-height: 80rpx;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
font-size: 28rpx;
font-weight: bold;
display: flex;
}
.shop-productName {
flex: 1;
display: flex;
flex-direction: column;
padding-left: 20rpx;
}
.shop-productName view {
height: 55rpx;
}
.shop-collapse {
display: flex;
height: 80rpx;
font-size: 26rpx;
line-height: 80rpx;
}
.shop-collapse text {
flex: 1;
text-align: center;
border-right: 1px solid #eee;
}
.noPic {
border-radius: 10px;
width: 140rpx;
height: 140rpx;
margin: 30rpx 0 0 30rpx;
text-align: center;
line-height: 140rpx;
color: #777;
background: #eee;
}
</style>
Loading…
Cancel
Save