123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386 |
- <template>
- <view class="query-wrap">
- <view class="inner-item">
- <view class="text-title">
- <view class="title-circ">
- </view>
- <span>基本信息</span>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label-podnme">
- 订单号:
- </view>
- <view class="shuo-unit">
- {{acceptDetaData.id}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 订单品种数
- </view>
- <view class="shuo-cont">
- {{acceptDetaData.detlCnt||""}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 订单总数量
- </view>
- <view class="shuo-cont">
- {{acceptDetaData.qtySum||""}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 订单总金额:
- </view>
- <view class="shuo-cont">
- {{acceptDetaData.purcAmt||""}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 剩余出库量:
- </view>
- <view class="shuo-cont">
- {{acceptDetaData.delvCnt||""}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label">
- 来源机构:
- </view>
- <view class="shuo-cont">
- {{acceptDetaData.branchName}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label">
- 采购类型:
- </view>
- <view class="shuo-cont">
- <span v-if="acceptDetaData.purcType == '2'">{{ item.oprn }}</span>
- <span v-if="acceptDetaData.purcType == '1'">普通采购</span>
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 采购时间:
- </view>
- <view class="shuo-cont">
- {{forMatTime(acceptDetaData.docmkDate)}}
- </view>
- </view>
- </view>
- </view>
- <view class="empty-cont" v-if="orderDelData.length=='0'">
- 暂无明细数据
- </view>
- <view class="inner-item" v-for="(item,idex) in orderDelData" :key="idex" @click.stop="itemDetails(item,idex)">
- <view class="text-title" v-if="idex=='0'">
- <view class="title-circ">
- </view>
- <span>耗材清单</span>
- </view>
- <view class="check-title" @tap.stop.prevent>
- <checkbox-group @change="checkChange" :data-id="item.id">
- <label>
- <checkbox :value="idex" />
- </label>
- </checkbox-group>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label-podnme">
- 耗材编码
- </view>
- <view class="shuo-unit">
- {{item.prodCode}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label-podnme">
- 医保编码
- </view>
- <view class="shuo-unit">
- {{item.hiCode}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label-podnme">
- {{item.prodName}}
- </view>
- <view class="shuo-unit">
- <span>{{ item.purcUnt }} ({{ item.convrat }}{{ item.prcUnt }}/{{
- item.purcUnt
- }})</span>
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 规格:
- </view>
- <view class="shuo-cont">
- {{item.spec}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 型号:
- </view>
- <view class="shuo-cont">
- {{item.mol}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 材质:
- </view>
- <view class="shuo-cont">
- {{item.matl}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 采购数量:
- </view>
- <view class="shuo-cont">
- {{item.purcCnt}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 已出库数量:
- </view>
- <view class="shuo-cont">
- {{item.delvCntYck}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 剩余出库量:
- </view>
- <view class="shuo-cont">
- {{item.toDelvCnt}}
- </view>
- </view>
- </view>
- </view>
- <uni-popup ref="popup">
- <uni-popup-dialog type="warn" :before-close="true" cancelText="取消" confirmText="确定" content="你确定当前操作吗?"
- @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
- </uni-popup>
- <view class="botm-btn">
- <button type="default" plain="true" style="width:240rpx;line-height: 70rpx;background: #01A992;color:#fff"
- @click.stop="accessData()">确认</button>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapMutations,
- mapActions
- } from 'vuex';
- import moment from "moment";
- export default {
- data() {
- return {
- listData: [],
- acceptDetaData: {},
- subMitData: {},
- selcectData: {} //详情选中的数据
- }
- },
- computed: {
- ...mapState(['orderDelData', 'instData', 'batchData'])
- },
- onShow() {
- let that = this;
- uni.getStorage({
- key: 'orderDetailsData',
- success: function(res) {
- that.touData({
- id: res.data.id,
- spdId: that.instData.spdId,
- });
- that.acceptDetaData = res.data;
- }
- });
- },
- mounted() {},
- methods: {
- ...mapActions(['getOrderAwaitDetail']),
- ...mapMutations(['setBatchData']),
- async touData(data) {
- this.getOrderAwaitDetail(data)
- },
- forMatTime(row) {
- return moment(row).format("YYYY-MM-DD HH:mm");
- },
- checkChange(e) {
- let newSelect = {
- ...this.selcectData
- };
- let chekData = e.detail.value;
- if (chekData.length > 0) {
- this.selcectData = {
- ...this.selcectData,
- [e.target.dataset.id]: this.orderDelData[chekData[0]]
- }
- } else {
- delete newSelect[e.target.dataset.id]
- this.selcectData = newSelect;
- }
- },
- //耗材添加批次跳转
- itemDetails(item, index) {
- if (!this.selcectData[item.id]) {
- uni.showToast({
- title: '请选中再添加批次',
- icon: 'none',
- duration: 1000,
- });
- return;
- }
- uni.setStorage({
- key: 'batchDelsData',
- data: item
- });
- uni.navigateTo({
- url: '/subpkg/pages/order-outbond/batch',
- success: function(res) {
- console.log(res, "res")
- }
- });
- },
- //确认/退回
- accessData() {
- if (JSON.stringify(this.selcectData) === "{}") {
- uni.showToast({
- title: '请选择出库耗材',
- icon: 'none',
- duration: 1000,
- });
- return;
- };;
- let selectKey = Object.keys(this.selcectData);
- let filterEmpty = selectKey.filter((item) => {
- return this.batchData[item] == null || this.batchData[item].length == 0
- })
- if (filterEmpty.length > 0) {
- uni.showToast({
- title: '请为选中的耗材添加批次',
- icon: 'none',
- duration: 1000,
- });
- return;
- };
- let newSubData = [];
- selectKey.forEach((item) => {
- newSubData.push(this.batchData[item])
- })
- const merged = newSubData.reduce((acc, current) => [...acc, ...current], []);
- this.$http('orderOutbond.subMitData', {
- spdId: this.instData.spdId,
- detlList: merged
- }, '加载中').then(res => {
- if (res.success == true) {
- this.setBatchData({});
- uni.navigateTo({
- url: '/subpkg/pages/order-outbond/index',
- success: function(res) {
- console.log(res, "res")
- }
- });
- }
- }).catch(e => {
- })
- },
- //属性值进行比较
- //日期格式化
- forMatTime(time) {
- return moment(time).format("YYYY-MM-DD");
- },
- //加时分秒
- forMatTimehs(time) {
- return moment(time).format("YYYY-MM-DD HH:mm");
- },
- },
- watch: {
- }
- }
- </script>
- <style lang="scss" scoped>
- .query-wrap {
- width: 100%;
- height: 100%;
- padding: 20rpx;
- box-sizing: border-box;
- background-color: #F1F1F1;
- overflow-y: scroll;
- overflow-x: hidden;
- position: relative;
- padding-bottom: 200rpx;
- .botm-btn {
- width: 100%;
- height: 120rpx;
- background-color: #fff;
- position: fixed;
- left: 0;
- bottom: 0;
- padding-top: 40rpx;
- display: flex;
- align-items: center;
- justify-content: space-around;
- }
- .time-view {
- height: 350rpx;
- background-color: #fff;
- padding: 50rpx 50rpx 0 50rpx;
- box-sizing: border-box;
- .btn-view {
- width: 100%;
- height: 100rpx;
- margin-top: 100rpx;
- display: flex;
- justify-content: space-around;
- }
- }
- }
- uni-page-body {
- width: 100%;
- height: 100%;
- }
- </style>
|