耗材管理修改
This commit is contained in:
@@ -86,7 +86,7 @@
|
|||||||
})
|
})
|
||||||
let show = ref(props.show)
|
let show = ref(props.show)
|
||||||
let type = ref(props.type)
|
let type = ref(props.type)
|
||||||
let itemData = ref(props.item)
|
let consId = ref()
|
||||||
watch(() => props.show, (newval) => {
|
watch(() => props.show, (newval) => {
|
||||||
show.value = newval
|
show.value = newval
|
||||||
})
|
})
|
||||||
@@ -104,7 +104,10 @@
|
|||||||
/**
|
/**
|
||||||
* 打开报损弹窗
|
* 打开报损弹窗
|
||||||
*/
|
*/
|
||||||
function open() {
|
function open(d) {
|
||||||
|
if(d){
|
||||||
|
consId.value = d
|
||||||
|
}
|
||||||
show.value = true;
|
show.value = true;
|
||||||
emits('open')
|
emits('open')
|
||||||
}
|
}
|
||||||
@@ -179,9 +182,10 @@
|
|||||||
* 确认
|
* 确认
|
||||||
*/
|
*/
|
||||||
function affirm() {
|
function affirm() {
|
||||||
|
console.log(consId.value,'调试1')
|
||||||
let params = {
|
let params = {
|
||||||
coverImg: vdata.imgUrlList,
|
coverImg: vdata.imgUrlList,
|
||||||
consId: itemData.value.consId,
|
consId: consId.value,
|
||||||
amount: vdata.stockNumber,
|
amount: vdata.stockNumber,
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
...datas.form,
|
...datas.form,
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
conTypeId: datas.list[datas.nowStatusIndex].id,
|
conTypeId: datas.list[datas.nowStatusIndex].id,
|
||||||
id: datas.form.consId
|
id: datas.form.id
|
||||||
}]).then(res => {
|
}]).then(res => {
|
||||||
go.to('PAGES_SALES_CONSUMABLES')
|
go.to('PAGES_SALES_CONSUMABLES')
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -74,9 +74,9 @@
|
|||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
onMounted,
|
|
||||||
computed
|
computed
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
import {onShow} from '@dcloudio/uni-app'
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
import {
|
import {
|
||||||
viewConInfoFlowget,
|
viewConInfoFlowget,
|
||||||
@@ -115,12 +115,11 @@
|
|||||||
})
|
})
|
||||||
let showStatus = ref(false)
|
let showStatus = ref(false)
|
||||||
let nowStatusIndex = ref(0)
|
let nowStatusIndex = ref(0)
|
||||||
onMounted(() => {
|
onShow(() => {
|
||||||
getList()
|
getList()
|
||||||
// 获取分类列表
|
// 获取分类列表
|
||||||
gettbConsTypeList()
|
gettbConsTypeList()
|
||||||
})
|
})
|
||||||
|
|
||||||
function changeNowStatusIndex(i) {
|
function changeNowStatusIndex(i) {
|
||||||
nowStatusIndex.value = i
|
nowStatusIndex.value = i
|
||||||
showStatus.value = false
|
showStatus.value = false
|
||||||
@@ -156,15 +155,15 @@
|
|||||||
|
|
||||||
let toggle = (d) => {
|
let toggle = (d) => {
|
||||||
refMoreSheet.value.open()
|
refMoreSheet.value.open()
|
||||||
actionSheet.activeId = d.consId
|
actionSheet.activeId = d.id
|
||||||
report.data.consId = d.consId
|
report.data.consId = d.id
|
||||||
actionSheet.active = d
|
actionSheet.active = d
|
||||||
}
|
}
|
||||||
|
|
||||||
let sheetClick = (index) => {
|
let sheetClick = (index) => {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
//打开报损弹窗
|
//打开报损弹窗
|
||||||
reportDamage.value.open();
|
reportDamage.value.open(actionSheet.activeId);
|
||||||
report.data.name = actionSheet.active.conName
|
report.data.name = actionSheet.active.conName
|
||||||
report.data.unit = actionSheet.active.conUnit
|
report.data.unit = actionSheet.active.conUnit
|
||||||
} else if (index == 1) {
|
} else if (index == 1) {
|
||||||
@@ -176,6 +175,7 @@
|
|||||||
item: JSON.stringify(actionSheet.active)
|
item: JSON.stringify(actionSheet.active)
|
||||||
})
|
})
|
||||||
} else if (index == 3) {
|
} else if (index == 3) {
|
||||||
|
console.log(actionSheet.activeId,'调试1')
|
||||||
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
|
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
|
||||||
consId: actionSheet.activeId,
|
consId: actionSheet.activeId,
|
||||||
item: JSON.stringify(actionSheet.active)
|
item: JSON.stringify(actionSheet.active)
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
function toggle() {
|
function toggle() {
|
||||||
tbConsInfotbConCheck({
|
tbConsInfotbConCheck({
|
||||||
stockNumber: datas.item.balance,
|
stockNumber: datas.item.balance,
|
||||||
conInfoId: datas.form.consId,
|
conInfoId: datas.form.id,
|
||||||
lpNum: profitNumber._value
|
lpNum: profitNumber._value
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
go.to('PAGES_SALES_CONSUMABLES')
|
go.to('PAGES_SALES_CONSUMABLES')
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<view>
|
<view>
|
||||||
出库数量
|
<text style="color: red;">*</text>出库数量
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<view>
|
<view>
|
||||||
单价
|
<text style="color: red;">*</text>单价
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
|
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
|
||||||
@@ -84,6 +84,8 @@
|
|||||||
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
||||||
text="取消"></up-button> -->
|
text="取消"></up-button> -->
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 消息提示 -->
|
||||||
|
<up-toast ref="uToastRef"></up-toast>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@@ -92,7 +94,8 @@
|
|||||||
ref,
|
ref,
|
||||||
computed,
|
computed,
|
||||||
reactive,
|
reactive,
|
||||||
onMounted
|
onMounted,
|
||||||
|
getCurrentInstance
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import color from '@/commons/color.js';
|
import color from '@/commons/color.js';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
@@ -102,6 +105,7 @@
|
|||||||
tbShopPurveyor
|
tbShopPurveyor
|
||||||
} from '@/http/yskApi/requestAll.js';
|
} from '@/http/yskApi/requestAll.js';
|
||||||
let showStatus = ref(false)
|
let showStatus = ref(false)
|
||||||
|
const refs = getCurrentInstance()
|
||||||
let datas = reactive({
|
let datas = reactive({
|
||||||
// 供应商列表
|
// 供应商列表
|
||||||
list: [],
|
list: [],
|
||||||
@@ -156,8 +160,25 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sumbit() {
|
function sumbit() {
|
||||||
|
|
||||||
|
if (!datas.form.list.stockNumber) {
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "请输入必填项",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(!datas.form.list.price){
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "请输入必填项",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
datas.form.list.conInfoId = props.consId
|
datas.form.list.conInfoId = props.consId
|
||||||
datas.form.list = [datas.form.list]
|
datas.form.list = [datas.form.list]
|
||||||
|
|
||||||
|
|
||||||
tbConsInfostockInOut({
|
tbConsInfostockInOut({
|
||||||
...datas.form,
|
...datas.form,
|
||||||
// 供应商id
|
// 供应商id
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<view>
|
<view>
|
||||||
入库数量
|
<text style="color: red;">*</text> 入库数量
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<view>
|
<view>
|
||||||
单价
|
<text style="color: red;">*</text>单价
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
|
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
|
||||||
@@ -84,6 +84,8 @@
|
|||||||
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
|
||||||
text="取消"></up-button> -->
|
text="取消"></up-button> -->
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 消息提示 -->
|
||||||
|
<up-toast ref="uToastRef"></up-toast>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@@ -92,7 +94,8 @@
|
|||||||
ref,
|
ref,
|
||||||
computed,
|
computed,
|
||||||
reactive,
|
reactive,
|
||||||
onMounted
|
onMounted,
|
||||||
|
getCurrentInstance
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import color from '@/commons/color.js';
|
import color from '@/commons/color.js';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
@@ -126,8 +129,9 @@
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
datas.item = JSON.parse(props.item)
|
datas.item = JSON.parse(props.item)
|
||||||
|
datas.form = assign(datas.form, ...datas.item)
|
||||||
})
|
})
|
||||||
|
const refs = getCurrentInstance()
|
||||||
function toggle() {
|
function toggle() {
|
||||||
go.to('PAGES_ADD_SUPPLIER')
|
go.to('PAGES_ADD_SUPPLIER')
|
||||||
}
|
}
|
||||||
@@ -156,7 +160,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sumbit() {
|
function sumbit() {
|
||||||
datas.form.list.conInfoId = props.consId
|
if (!datas.form.list.stockNumber) {
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "请输入必填项",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(!datas.form.list.price){
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "请输入必填项",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
datas.form.list.conInfoId = datas.item.id
|
||||||
datas.form.list = [datas.form.list]
|
datas.form.list = [datas.form.list]
|
||||||
tbConsInfostockInOut({
|
tbConsInfostockInOut({
|
||||||
...datas.form,
|
...datas.form,
|
||||||
|
|||||||
@@ -14,20 +14,20 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="receipts-money">
|
<view class="receipts-money">
|
||||||
<text class="money-title">成交金额 (元)</text>
|
<text class="money-title">成交金额 (元)</text>
|
||||||
<view class="money-num">{{ list.sale.incomeAmountAll}}</view>
|
<view class="money-num">{{ list.sale.incomeAmountAll||0}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-list">
|
<view class="money-list">
|
||||||
<view class="money-item">
|
<view class="money-item">
|
||||||
<text class="money-title">消费笔数</text>
|
<text class="money-title">消费笔数</text>
|
||||||
<view class="money-num">{{ list.vip.useNum }}</view>
|
<view class="money-num">{{ list.vip.useNum||0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-item">
|
<view class="money-item">
|
||||||
<text class="money-title">退款金额 (元)</text>
|
<text class="money-title">退款金额 (元)</text>
|
||||||
<view class="money-num">{{ list.sale.outAmount}}</view>
|
<view class="money-num">{{ list.sale.outAmount||0}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-item">
|
<view class="money-item">
|
||||||
<text class="money-title">消费笔数</text>
|
<text class="money-title">消费金额</text>
|
||||||
<view class="money-num">{{ list.count.useNum }}</view>
|
<view class="money-num">{{ list.vip.useAmount||0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="money-list" v-if="vdata.memberIsShow">
|
<view class="money-list" v-if="vdata.memberIsShow">
|
||||||
|
|||||||
Reference in New Issue
Block a user