chenyue 3 년 전
부모
커밋
1a7d0711e2

+ 2 - 2
mini-pro-web/src/views/device/cargoLane/setting.vue

@ -246,8 +246,8 @@ export default{
            })
            let p = {
                id: ids.join(","),
                cargoCapacity: data
                cargoCapacity: data,
                userId: this.user.id,
            }
            console.log('params', p)
            medicineAbinetApi

+ 17 - 8
mini-pro-web/src/views/device/infoLog/deviceLog.vue

@ -8,15 +8,20 @@
            </div>
            <van-button class='c-border-r-5 w80' type="info" @click="onSearch">搜索</van-button>
        </div>
        <div v-for='(item, index) in list'>
            <div class='c-border-b bgc-fff p10 c-333 c-f14 flex f_y_c'>
                <div style='flex: 1' class='flex f_y_c f_x_s mr30'>
                    <div>{{item.content}}</div>
                    <div>{{item.title}}</div>
        <!-- <CustomList 
			ref="customList"
            :searchfun='false'
			@onLoad="onLoad"> -->
            <div v-for='(item, index) in list'>
                <div class='c-border-b bgc-fff p10 c-333 c-f14 flex f_y_c'>
                    <div style='flex: 1' class='flex f_y_c f_x_s mr30'>
                        <div>{{item.content}}</div>
                        <div>{{item.title}}</div>
                    </div>
                    <div>{{item.time}}</div>
                </div>
                <div>{{item.time}}</div>
            </div>
        </div>
        <!-- </CustomList> -->
        <van-overlay :show="show1||show2" @click="show1=false,show2 = false" >
            <van-datetime-picker
                class='c-position-a'
@ -42,6 +47,7 @@
    </div>
</template>
<script>
import medicineAbinetApi from '@/api/api-medicineAbinet'
export default{
    name: 'deviceLog',
    data(){
@ -60,8 +66,11 @@ export default{
        onSearch(){
        },
        onLoad({}){
            
        }
    },
    created(){
    onLoad(){
        this.list = [{content:'改变设备销售状态',title:'设备补货',time:'2020/09/01 10:03:00'},{content:'改变设备销售状态',title:'设备补货',time:'2020/09/01 10:03:00'}]
    }
}

+ 3 - 3
mini-pro-web/src/views/drug/list.vue

@ -78,11 +78,11 @@ export default {
    methods: {
        getDrugDictionary(){
            var val = this.value
			// if(val&&val.length>=2){
			if(val&&val.length>=2){
                var p = {
                    content: this.value,
                    page: 1,
                    size: 50
                    size: 999
                }
                console.log('params', p)
                medicineAbinetApi
@ -96,7 +96,7 @@ export default {
                    .catch(err=>{
                        console.error(err)
                    })
			// }
			}
        },
        onCancel(){
            this.$router.back()

+ 45 - 63
mini-pro-web/src/views/replenishment/record/list.vue

@ -5,9 +5,10 @@
                <van-tab title="补货"></van-tab>
                <van-tab title="换货"></van-tab>
                <van-tab title="上货"></van-tab>
                <van-tab title="下架"></van-tab>
            </van-tabs>
        </van-sticky>
        <CustomList 
        <CustomList
			ref="customList"
            :searchfun='false'
			@onLoad="onLoad">
@ -50,76 +51,29 @@ export default{
        }
    },
    watch:{
        activeName(n){
            //'808080eb7d8524f8017d85911adf0001'
            medicineAbinetApi.findDeviceById({deviceId: this.list[n].id}).then(res=>{
                if(res.status==200){
                    this.list[n].children = res.obj.inventoryList;
                }
            })
        active(n){
            this.$refs.customList.refresh(true);
        }
    },
    created() {
        
    },
    methods:{
        // onLoad({page, pageSize, searchText}){
        //     setTimeout(()=>{
        //         for(var i=0; i<pageSize; i++){
        //             this.list.push((page-1)*pageSize + i)
        //         }
        //         console.log(this.list)
        //         debugger
        //         this.$refs.customList.endLoad(page==5, this.list.length)
        //     }, 1000)
        //     return
        //     var that = this, 
        //         params = {
        //             orgCode: this.$store.getters.orgCode,
        //             doctorNameKey: searchText,
        //             dept: this.routerParam.dept,
        //             diseaseKey: this.routerParam.disease,
        //             page: page,
        //             pagesize: pageSize
        //         };
            
        //     zhuanjiazixunApi
        //         .findDoctorByHospitalAndDiseaseAndDept(params)
        //         .then(res=>{
        //             if(res.status == 200){
        //                 var list = res.detailModelList.map(item=>{
        //                     var data = item
        //                     data.photo = this.$root.setDocPhoto(data.photo)
        //                     return data
        //                 })
        //                 this.list = page==1? list : this.list.concat(list)
        //                 this.$refs.customList.endLoad(!res.detailModelList || res.detailModelList.length==0, this.list.length)
        //             } else {
        //                 this.$refs.customList[this.active].endLoad(false, true)
        //             }
        //         }).catch(err=>{
        //             console.error(err)
        //             this.$refs.customList[this.active].endLoad(false, true)
        //         })
        // },
        onLoad({page, pageSize, searchText}){
            var p = {
                userId: this.user.id,
                page: 1,
                size: pageSize
            }
            console.log('params', p)
            medicineAbinetApi.getDeviceListWithUserId(p)
            var that = this, 
                params = {
                    type: this.active+1,
                    userId: this.user.id,
                    page: page,
                    size: pageSize
                };
            
            medicineAbinetApi
                .getDeviceInventoryRecordListWithUserId(params)
                .then(res=>{
                    console.log('getDeviceListWithUserId', res)
                    if(res.status == 200){
                        res.detailModelList.forEach(el=>{
                            el.children = []
                        })
                   if(res.status == 200){
                        var list = res.detailModelList
                        
                        this.list = page==1? list : this.list.concat(list)
                        debugger
                        this.$refs.customList.endLoad(res.totalPage<=page, this.list.length)
                    } else {
                        this.list = []
@ -127,10 +81,38 @@ export default{
                    }
                }).catch(err=>{
                    console.error(err)
                    this.list = []
                    this.$refs.customList.endLoad(false, true)
                    this.$refs.customList[this.active].endLoad(false, true)
                })
        },
        // onLoad({page, pageSize, searchText}){
        //     var p = {
        //         userId: this.user.id,
        //         page: 1,
        //         size: pageSize
        //     }
        //     console.log('params', p)
        //     medicineAbinetApi.getDeviceListWithUserId(p)
        //         .then(res=>{
        //             console.log('getDeviceListWithUserId', res)
        //             if(res.status == 200){
        //                 res.detailModelList.forEach(el=>{
        //                     el.children = []
        //                 })
        //                 var list = res.detailModelList
                        
        //                 this.list = page==1? list : this.list.concat(list)
        //                 debugger
        //                 this.$refs.customList.endLoad(res.totalPage<=page, this.list.length)
        //             } else {
        //                 this.list = []
        //                 this.$refs.customList.endLoad(false, true)
        //             }
        //         }).catch(err=>{
        //             console.error(err)
        //             this.list = []
        //             this.$refs.customList.endLoad(false, true)
        //         })
        // },
    },
}
</script>

+ 2 - 1
mini-pro-web/src/views/replenishment/start/components/SetStockDialog.vue

@ -77,7 +77,8 @@ export default{
            let p = {
                id: this.trackId,
                drugId: this.drugId,
                qty: this.stock
                qty: this.stock,
                userId: this.user.id,
            }
            
            console.log('params', p)