app新购
This commit is contained in:
parent
4754c09e23
commit
186a19dae0
|
|
@ -2,7 +2,7 @@
|
|||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"playground" : "custom",
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version": "0.0",
|
||||
"configurations": [{
|
||||
"app-plus" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"default" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -28,15 +28,15 @@
|
|||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view class="search">搜索</view>
|
||||
<view class="search" @click="getTableList()">搜索</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
||||
|
||||
<div class="table-list-item" v-for="(item, index) in tableList" :key="index" @click="handleItem(item)">
|
||||
<div class="title">
|
||||
<span style="font-size: 15px; font-weight: 800">新购验收</span>
|
||||
<span :style="{ color: item.status == 1 ? '#3784fb' : '#ff4d4f' }">{{
|
||||
item.status == 1 ? '已完成' : '未完成'
|
||||
<span :style="{ color: item.status == 1 ? '#ff4d4f' : '#3784fb' }">{{
|
||||
item.taskStatus == 2 ? '未完成' : '已完成'
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
|
@ -46,57 +46,66 @@
|
|||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">采购单号:</uni-col>
|
||||
<uni-col :span="18"><div class="cont">{{ item.purchaseNumber }}</div></uni-col>
|
||||
<uni-col :span="18"><div class="cont">{{ item.code }}</div></uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">采购物资:</uni-col>
|
||||
<uni-col :span="18"><div class="cont">{{ item.purchaseMaterial }}</div></uni-col>
|
||||
<uni-col :span="18"><div class="cont">{{ item.purchaseMaTypeName }}</div></uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">到货数量:</uni-col>
|
||||
<uni-col :span="18"><div class="cont">{{ item.arrivalQuantity }}</div></uni-col>
|
||||
<uni-col :span="18"><div class="cont">{{ item.purchaseMaNumber }}</div></uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">验收数量:</uni-col>
|
||||
<uni-col :span="18"><div class="cont">{{ item.acceptQuantity }}</div></uni-col>
|
||||
<uni-col :span="18"><div class="cont"> </div></uni-col>
|
||||
</uni-row>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
|
||||
import { ref, reactive } from 'vue';
|
||||
import { getPurchaseList } from '../../../services/purchase.js';
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
const active = ref(1)
|
||||
const tableList = reactive([
|
||||
{
|
||||
status: '1', // 状态
|
||||
arrivalTime: '2021-08-01 12:12:12', // 到货时间
|
||||
purchaseNumber: '123', // 采购单号
|
||||
// 采购物资
|
||||
purchaseMaterial: '物资1、物资2、物资3、物资4、物资5、物资6、物资7、物资8、物资9、物资10',
|
||||
arrivalQuantity: '100', // 到货数量
|
||||
acceptQuantity: '100', // 验收数量
|
||||
},
|
||||
{
|
||||
status: '0', // 状态
|
||||
arrivalTime: '2021-08-01 12:12:12', // 到货时间
|
||||
purchaseNumber: '123456', // 采购单号
|
||||
// 采购物资
|
||||
purchaseMaterial: 'fdhsajfkldsajfkldjsaklgjdklsahjgldjsafkljdsklajfdklsajfkdsajfkldsjfkldas',
|
||||
arrivalQuantity: '100', // 到货数量
|
||||
acceptQuantity: '100', // 验收数量
|
||||
},
|
||||
])
|
||||
const tableList = ref([])
|
||||
const statusList = ref(["3","13","4","14","19"])
|
||||
|
||||
const getTableList = () => {
|
||||
let obj = {
|
||||
"pageNum":"1",
|
||||
"pageSize":"10",
|
||||
"statusList":statusList.value,
|
||||
}
|
||||
console.log(obj)
|
||||
getPurchaseList(obj).then(res => {
|
||||
tableList.value = res.rows;
|
||||
console.log(tableList.value)
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
const changeTab = (index) => {
|
||||
active.value = index
|
||||
if(index==1){
|
||||
statusList.value=["3","13","4","14","19"]
|
||||
getTableList()
|
||||
}else if(index==2){
|
||||
statusList.value=["2","12"]
|
||||
getTableList()
|
||||
}
|
||||
|
||||
}
|
||||
const maskClick = () => {}
|
||||
const handleItem = (item) => {
|
||||
console.log('🚀 ~ handleItem ~ item:', item)
|
||||
uni.navigateTo({ url: '/pages/new-purchase/accept/acceptDetails' })
|
||||
}
|
||||
onLoad((options)=>{
|
||||
getTableList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -136,7 +145,7 @@ const handleItem = (item) => {
|
|||
}
|
||||
.table-list-item {
|
||||
margin: 20rpx 0;
|
||||
padding: 40rpx;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
min-height: 300rpx;
|
||||
border-radius: 10rpx;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
import { ref } from 'vue'
|
||||
const newPurchaseList = ref([
|
||||
{ title: '新购验收', url: '/pages/new-purchase/accept/index' },
|
||||
{ title: '新购到货', url: '/pages/new-purchase/bind/index' },
|
||||
// { title: '新购到货', url: '/pages/new-purchase/bind/index' },
|
||||
{ title: '新购绑定', url: '/pages/new-purchase/bind/index' },
|
||||
{ title: '新购入库', url: '/pages/new-purchase/entry/index' },
|
||||
])
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
import { http } from '@/utils/http'
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
*/
|
||||
export const getPurchaseList = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/purchase_check_info/list',
|
||||
data:data,
|
||||
})
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ import { useMemberStore } from '@/stores'
|
|||
* 拦截 request 请求
|
||||
* baseURL 设置请求ip地址和端口
|
||||
*/
|
||||
const baseURL = 'http://192.168.0.56:21627'
|
||||
const baseURL = 'http://192.168.2.246:18080'
|
||||
|
||||
/**
|
||||
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
||||
|
|
@ -27,10 +27,11 @@ const httpInterceptor = {
|
|||
// 'source-client': 'mini',
|
||||
...options.header,
|
||||
}
|
||||
|
||||
|
||||
// 4. 增加 token 请求头标识
|
||||
const memberStore = useMemberStore()
|
||||
const token = memberStore.userInfo.token
|
||||
// const token = memberStore.userInfo.token
|
||||
const token = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjQ2NDdmYjlkLWI5OTItNDRiNy05MTdkLTMwZjg0ZjUxYzM5MCIsInVzZXJuYW1lIjoiYWRtaW4ifQ.9xM5bFhrmHK09-4ZgL5SS8WraNIJjIijuB-1P0lJF-n0KlVM5Bglvyjltk1NQbdqgi1hwRocZS1OU41cLiwuig"
|
||||
if (token) {
|
||||
options.header.Authorization = token
|
||||
}
|
||||
|
|
@ -65,6 +66,7 @@ export const http = (options) => {
|
|||
// })
|
||||
reject(res)
|
||||
}
|
||||
console.log(res)
|
||||
},
|
||||
fail(err) {
|
||||
// uni.showToast({
|
||||
|
|
|
|||
Loading…
Reference in New Issue