tapd相关修改更新
This commit is contained in:
@@ -69,11 +69,7 @@
|
||||
typelist: [],
|
||||
nowStatusIndex: 0
|
||||
})
|
||||
// const props = defineProps({
|
||||
// item: {
|
||||
// type: String
|
||||
// }
|
||||
// })
|
||||
|
||||
onMounted(() => {
|
||||
gettbConsTypeList()
|
||||
})
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
<template>
|
||||
<view class="addType">
|
||||
<view v-for="item in datas.list">
|
||||
<view class="">
|
||||
{{item.name}}<up-icon color="#64A7FE" name="edit-pen" @tap="showoneEvent(item)"></up-icon>
|
||||
</view>
|
||||
<view class="">
|
||||
是否启用
|
||||
<up-switch checked="true" :activeValue="1" size="20" :inactiveValue="0"
|
||||
@change="switchChangeEvent($event,item)" :modelValue="item.status" style="transform:scale(0.7)" />
|
||||
<view>
|
||||
<view class="addType">
|
||||
<view v-for="item in datas.list">
|
||||
<view class="">
|
||||
{{item.name}}<up-icon color="#64A7FE" name="edit-pen" @tap="showoneEvent(item)"></up-icon>
|
||||
</view>
|
||||
<view class="">
|
||||
是否启用
|
||||
<up-switch checked="true" :activeValue="1" size="20" :inactiveValue="0"
|
||||
@change="switchChangeEvent($event,item)" :modelValue="item.status" style="transform:scale(0.7)" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-top: 100rpx; padding: 0 28rpx;padding-bottom: 50rpx;">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="datas.showtwo=true"
|
||||
:plain="true" text="添加"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-top: 100rpx; padding: 0 28rpx;">
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="datas.showtwo=true"
|
||||
:plain="true" text="添加"></up-button>
|
||||
</view>
|
||||
|
||||
<!-- 新增类别 -->
|
||||
<up-popup :show="datas.showtwo" :round="18" mode="center" @close="close">
|
||||
<view class="zhezhaopops">
|
||||
@@ -27,7 +30,7 @@
|
||||
耗材类型名称<input type="text" v-model="datas.name" style="padding: 0 20rpx;"/>
|
||||
</view>
|
||||
<view class="" style="margin-bottom: 20rpx;">
|
||||
是否禁用
|
||||
是否启用
|
||||
<up-switch checked="true" :activeValue="1" :inactiveValue="0" @change="switchChange"
|
||||
:modelValue="datas.status" style="transform:scale(0.7)" />
|
||||
</view>
|
||||
@@ -58,7 +61,7 @@
|
||||
list: [],
|
||||
showtwo: false,
|
||||
name: "",
|
||||
status: 0,
|
||||
status: 1,
|
||||
showone: false,
|
||||
activeData: ""
|
||||
})
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<text style="color: red;">*</text> 排序
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入排序" v-model="datas.form.sort" name="" id="">
|
||||
<input type="number" placeholder="请输入排序" @change="datas.form.sort=$utils.isNumber(datas.form.sort)" v-model="datas.form.sort" name="" id="">
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
|
||||
@@ -30,23 +30,19 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, computed, onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
|
||||
import { editCons } from '@/http/api/cons.js';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
let datas = reactive({
|
||||
form: {
|
||||
conWarning: 999
|
||||
},
|
||||
})
|
||||
onMounted(() => {
|
||||
let obj = JSON.parse(props.item)
|
||||
onLoad((options) => {
|
||||
let obj = JSON.parse(options.item)
|
||||
datas.form = obj
|
||||
})
|
||||
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
<view> {{datas.item.stockNumber}} </view>
|
||||
</view>
|
||||
<view>
|
||||
|
||||
<view> 实际数量 </view>
|
||||
<view> <input type="number" v-model="datas.form.actualNumber" placeholder="输入数量" name="" id=""> </view>
|
||||
<view> <input type="number" @change="datas.form.actualNumber=$utils.isNumber(datas.form.actualNumber)" v-model="datas.form.actualNumber" placeholder="输入数量" name="" id=""> </view>
|
||||
</view>
|
||||
<view>
|
||||
<view> 单价 </view>
|
||||
@@ -30,30 +31,20 @@
|
||||
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
onMounted,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import { ref, computed, onMounted, reactive, getCurrentInstance } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import color from '@/commons/color.js';
|
||||
import {
|
||||
tbConsInfotbConCheck
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
|
||||
import { stockCheck } from '@/http/api/cons.js';
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: ''
|
||||
}
|
||||
})
|
||||
let datas = reactive({
|
||||
item: "",
|
||||
form: {}
|
||||
})
|
||||
onMounted(() => {
|
||||
datas.item = JSON.parse(props.item)
|
||||
onLoad((options) => {
|
||||
console.log(options)
|
||||
datas.item = JSON.parse(options.item)
|
||||
datas.form = {
|
||||
...datas.item,
|
||||
actualNumber: 0
|
||||
@@ -66,28 +57,25 @@
|
||||
*/
|
||||
let profitPrice = computed(() => {
|
||||
// 如果剩余数量为负数
|
||||
if (datas.form.stockNumber < 0) {
|
||||
return (0 - datas.item.stockNumber) * datas.item.price
|
||||
} else {
|
||||
// if (datas.form.stockNumber < 0) {
|
||||
// return (0 - datas.item.stockNumber) * datas.item.price
|
||||
// } else {
|
||||
return ((datas.form.actualNumber - datas.item.stockNumber) * datas.item.price).toFixed(2);
|
||||
}
|
||||
// }
|
||||
})
|
||||
|
||||
/**
|
||||
* 盈亏数量
|
||||
*/
|
||||
let profitNumber = computed(() => {
|
||||
if (datas.form.stockNumber < 0) {
|
||||
return 0 - datas.item.stockNumber
|
||||
} else {
|
||||
// if (datas.form.stockNumber < 0) {
|
||||
// return 0 - datas.item.stockNumber
|
||||
// } else {
|
||||
return datas.form.actualNumber - datas.item.stockNumber
|
||||
}
|
||||
// }
|
||||
})
|
||||
|
||||
function toggle() {
|
||||
if(!datas.form.actualNumber){
|
||||
return
|
||||
}
|
||||
let toggle = uni.$utils.debounce(()=> {
|
||||
stockCheck({
|
||||
...datas.form,
|
||||
actualNumber: datas.form.actualNumber,
|
||||
@@ -95,9 +83,15 @@
|
||||
winLossNumber: profitNumber._value
|
||||
}).then(res => {
|
||||
// go.to('PAGES_SALES_CONSUMABLES')
|
||||
go.back()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: "none"
|
||||
})
|
||||
setTimeout(()=>{
|
||||
go.back()
|
||||
},1000)
|
||||
})
|
||||
}
|
||||
},1000)
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
</view>
|
||||
<view>
|
||||
<view> <text style="color: red;">*</text>出库数量 </view>
|
||||
<view> <input type="number" placeholder="请输入数量" v-model="datas.form.bodyList.inOutNumber" name="" id=""> </view>
|
||||
<view> <input type="number" placeholder="请输入数量" v-model="datas.form.bodyList.inOutNumber" @change="datas.form.bodyList.inOutNumber = $utils.isNumber(datas.form.bodyList.inOutNumber)" name="" id=""> </view>
|
||||
</view>
|
||||
<view>
|
||||
<view> <text style="color: red;">*</text>单价 </view>
|
||||
<view> <input type="number" placeholder="请输入单价(元)" v-model="datas.form.bodyList.purchasePrice" name="" id=""> </view>
|
||||
<view> <input type="number" placeholder="请输入单价(元)" v-model="datas.form.bodyList.purchasePrice" @change="datas.form.bodyList.purchasePrice = $utils.isPrice(datas.form.bodyList.purchasePrice)" name="" id=""> </view>
|
||||
</view>
|
||||
<view style="justify-content: space-between;">
|
||||
<view> 单位 </view>
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, reactive, onMounted, getCurrentInstance } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import dayjs from 'dayjs';
|
||||
@@ -90,16 +90,9 @@
|
||||
},
|
||||
item: ""
|
||||
})
|
||||
const props = defineProps({
|
||||
consId: {
|
||||
type: String
|
||||
},
|
||||
item: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
datas.item = JSON.parse(props.item)
|
||||
|
||||
onLoad((options) => {
|
||||
datas.item = JSON.parse(options.item)
|
||||
datas.form = Object.assign(datas.form, datas.item)
|
||||
// 单位列表
|
||||
datas.unitList = [ datas.form.conUnit,datas.form.conUnitTwo]
|
||||
@@ -147,7 +140,7 @@
|
||||
datas.inOutDate = dayjs(datas.form.inOutDate).format('YYYY-MM-DD')
|
||||
}
|
||||
|
||||
function sumbit() {
|
||||
let sumbit = uni.$utils.debounce(() => {
|
||||
|
||||
if (!datas.form.bodyList.inOutNumber) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
@@ -175,7 +168,7 @@
|
||||
}).then(res => {
|
||||
go.back()
|
||||
})
|
||||
}
|
||||
},1000)
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
||||
@@ -23,17 +23,11 @@
|
||||
<view :style="{color:item.waitAmount>0?' #F02C45;':''}">
|
||||
{{item.waitAmount}}
|
||||
</view>
|
||||
<view class="">
|
||||
剩余支付金额
|
||||
</view>
|
||||
<view class=""> 剩余支付金额 </view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view style="color: #318AFE;">
|
||||
{{item.waitCount}}未付
|
||||
</view>
|
||||
<view class="">
|
||||
待付款笔数
|
||||
</view>
|
||||
<view style="color: #318AFE;"> {{item.waitCount}}未付 </view>
|
||||
<view class=""> 待付款笔数 </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="df">
|
||||
@@ -66,6 +60,8 @@
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="toUrl('PAGES_ADD_SUPPLIER')"
|
||||
:plain="true" text="添加供应商"></up-button>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -98,10 +94,21 @@
|
||||
* 删除供应商
|
||||
*/
|
||||
let deleteEvent = (id) => {
|
||||
delVendor(id).then(() => {
|
||||
getList()
|
||||
})
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否确认删除此供应商?',
|
||||
success: res => {
|
||||
if(res.confirm){
|
||||
delVendor(id).then(() => {
|
||||
getList()
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
});
|
||||
}
|
||||
|
||||
let toUrl = (url, d) => {
|
||||
go.to(url, d)
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="viewrecordsTop" v-if="datas.countList">
|
||||
<view style="padding:32rpx 16rpx;">
|
||||
<view @tap="getInOutType('in')">
|
||||
增加数量 <text
|
||||
增加数量 <text
|
||||
style="color: #76ACF0;font-weight: bold;">{{datas.countList.inSumTotal?datas.countList.inSumTotal:'0'}}</text>
|
||||
</view>
|
||||
<view class="df viewdf">
|
||||
@@ -27,7 +27,7 @@
|
||||
</view>
|
||||
<view style="padding:32rpx 16rpx;">
|
||||
<view class="" @tap="getInOutType('out')">
|
||||
减少数量 <text
|
||||
减少数量 <text
|
||||
style="color: #52BDA4;font-weight: bold;">{{datas.countList.outSumTotal?datas.countList.outSumTotal:0}}</text>
|
||||
</view>
|
||||
<view class="df viewdf">
|
||||
@@ -78,7 +78,7 @@
|
||||
</view>
|
||||
<view class="">
|
||||
<view :style="{color:item.inOutType=='in'?'#1bca72':'red'}" style="font-weight: 400;">
|
||||
{{ item.inOutType == 'in' ? '+' : '-' }}{{ item.inOutNumber|0 }}
|
||||
{{ item.inOutType == 'in' ? '+' : '' }}{{ item.inOutNumber|0 }}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #666666;">
|
||||
变动库存
|
||||
@@ -91,24 +91,20 @@
|
||||
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref, computed, getCurrentInstance } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import color from '@/commons/color.js';
|
||||
import { stockFlow,consStatistics } from '@/http/api/cons.js';
|
||||
|
||||
let props = defineProps({
|
||||
item: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
|
||||
let datas = reactive({
|
||||
list: [],
|
||||
countList: {},
|
||||
inOutType: '',
|
||||
inOutItem: '',
|
||||
item: null,
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
let items = JSON.parse(props.item)
|
||||
onLoad((options) => {
|
||||
datas.item = JSON.parse(options.item)
|
||||
getlist()
|
||||
})
|
||||
|
||||
@@ -135,10 +131,9 @@
|
||||
* 获取数据
|
||||
*/
|
||||
function getlist (conTypeId = "", start, end, ) {
|
||||
let ids = JSON.parse(props.item)
|
||||
// 列表
|
||||
stockFlow({
|
||||
conId: ids.id,
|
||||
conId: datas.item.id,
|
||||
inOutType: datas.inOutType,
|
||||
inOutItem: datas.inOutItem
|
||||
}).then(res => {
|
||||
@@ -146,7 +141,7 @@
|
||||
})
|
||||
// 顶部数据
|
||||
consStatistics({
|
||||
conId: ids.id,
|
||||
id: datas.item.id,
|
||||
}).then(res => {
|
||||
datas.countList = res
|
||||
})
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
</view>
|
||||
<view>
|
||||
<view> <text style="color: red;">*</text> 入库数量 </view>
|
||||
<view> <input type="number" placeholder="请输入数量" v-model="datas.form.bodyList.inOutNumber" name="" id=""> </view>
|
||||
<view> <input type="number" placeholder="请输入数量" v-model="datas.form.bodyList.inOutNumber" @change="datas.form.bodyList.inOutNumber = $utils.isNumber(datas.form.bodyList.inOutNumber)" name="" id=""> </view>
|
||||
</view>
|
||||
<view>
|
||||
<view> <text style="color: red;">*</text>单价 </view>
|
||||
<view> <input type="number" placeholder="请输入单价(元)" v-model="datas.form.bodyList.purchasePrice" name="" id=""> </view>
|
||||
<view> <input type="number" placeholder="请输入单价(元)" v-model="datas.form.bodyList.purchasePrice" @change="datas.form.bodyList.purchasePrice = $utils.isPrice(datas.form.bodyList.purchasePrice)" name="" id=""> </view>
|
||||
</view>
|
||||
<view style="justify-content: space-between;">
|
||||
<view> 单位 </view>
|
||||
@@ -64,11 +64,12 @@
|
||||
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, reactive, onMounted, getCurrentInstance } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { ref, computed, reactive, getCurrentInstance } from 'vue';
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { getVendorPage } from '@/http/api/vendor.js';
|
||||
import { consStockIn } from '@/http/api/cons.js';
|
||||
|
||||
@@ -89,16 +90,10 @@
|
||||
},
|
||||
item: ""
|
||||
})
|
||||
const props = defineProps({
|
||||
consId: {
|
||||
type: String
|
||||
},
|
||||
item: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
datas.item = JSON.parse(props.item)
|
||||
|
||||
onLoad((options) => {
|
||||
console.log(options)
|
||||
datas.item = JSON.parse(options.item)
|
||||
datas.form = Object.assign(datas.form, datas.item)
|
||||
console.log(datas.form)
|
||||
// 单位列表
|
||||
@@ -151,7 +146,7 @@
|
||||
}
|
||||
|
||||
|
||||
function sumbit() {
|
||||
let sumbit = uni.$utils.debounce(() => {
|
||||
if (!datas.form.bodyList.inOutNumber) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
@@ -190,9 +185,8 @@
|
||||
go.back()
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
},1000)
|
||||
// 获取供应商
|
||||
|
||||
const statusHeight = computed(() => {
|
||||
return 30 * datas.status.length + 14 + 'px'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user