|
@@ -5,46 +5,46 @@
|
|
|
<view class="space-view ex-info">
|
|
<view class="space-view ex-info">
|
|
|
<view class="info-cell">
|
|
<view class="info-cell">
|
|
|
<view class="cell-label"> 来源</view>
|
|
<view class="cell-label"> 来源</view>
|
|
|
- <view class="cell-value"> {{ putData.outShopName || "" }}</view>
|
|
|
|
|
|
|
+ <view class="cell-value"> {{ inStockData.outShopName || "" }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-cell">
|
|
<view class="info-cell">
|
|
|
<view class="cell-label"> 日期</view>
|
|
<view class="cell-label"> 日期</view>
|
|
|
- <view class="cell-value"> {{ putData.updateTime?putData.updateTime.substr(5,11):'' }}</view>
|
|
|
|
|
|
|
+ <view class="cell-value"> {{ inStockData.updateTime?inStockData.updateTime.substr(5,11):'' }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-cell">
|
|
<view class="info-cell">
|
|
|
<view class="cell-label"> 操作</view>
|
|
<view class="cell-label"> 操作</view>
|
|
|
- <view class="cell-value"> {{ putData.adminName || "" }}</view>
|
|
|
|
|
|
|
+ <view class="cell-value"> {{ inStockData.adminName || "" }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-cell">
|
|
<view class="info-cell">
|
|
|
<view class="cell-label"> 编号</view>
|
|
<view class="cell-label"> 编号</view>
|
|
|
- <view class="cell-value"> {{ putData.orderSn }}</view>
|
|
|
|
|
|
|
+ <view class="cell-value"> {{ inStockData.orderSn }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="info-cell" v-if="putData.debt == 1">
|
|
|
|
|
|
|
+ <view class="info-cell" v-if="inStockData.debt == 1">
|
|
|
<view class="cell-label"> 结算</view>
|
|
<view class="cell-label"> 结算</view>
|
|
|
<view class="cell-value"> <text style="color:red;">欠款</text></view>
|
|
<view class="cell-value"> <text style="color:red;">欠款</text></view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-cell">
|
|
<view class="info-cell">
|
|
|
<view class="cell-label"> 状态</view>
|
|
<view class="cell-label"> 状态</view>
|
|
|
- <view :class="[ 'cell-value', { warning: putData.status == PUT_STATUS.CONFIRM }, { success: putData.status == PUT_STATUS.DONE } ]" >
|
|
|
|
|
- {{ getItemStatusName(putData.status) || "" }}
|
|
|
|
|
|
|
+ <view :class="[ 'cell-value', { warning: inStockData.status == PUT_STATUS.CONFIRM }, { success: inStockData.status == PUT_STATUS.DONE } ]" >
|
|
|
|
|
+ {{ getItemStatusName(inStockData.status) || "" }}
|
|
|
</view >
|
|
</view >
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-cell">
|
|
<view class="info-cell">
|
|
|
<view class="cell-label"> 备注</view>
|
|
<view class="cell-label"> 备注</view>
|
|
|
<view class="cell-value">
|
|
<view class="cell-value">
|
|
|
- {{ putData.remark || "" }}
|
|
|
|
|
|
|
+ {{ inStockData.remark || "" }}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="space-view ex-table">
|
|
<view class="space-view ex-table">
|
|
|
- <block v-if="!$util.isEmpty(putData.itemInfo)">
|
|
|
|
|
|
|
+ <block v-if="!$util.isEmpty(inStockData.itemInfo)">
|
|
|
<t-table :headerBackgroundColor="'#F0F2F6'">
|
|
<t-table :headerBackgroundColor="'#F0F2F6'">
|
|
|
<t-tr header>
|
|
<t-tr header>
|
|
|
<t-th v-for="(item, index) in columns" :key="index" :align="item.align">
|
|
<t-th v-for="(item, index) in columns" :key="index" :align="item.align">
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</t-th>
|
|
</t-th>
|
|
|
</t-tr>
|
|
</t-tr>
|
|
|
- <t-tr v-for="(item, index) in putData.itemInfo" :key="index">
|
|
|
|
|
|
|
+ <t-tr v-for="(item, index) in inStockData.itemInfo" :key="index">
|
|
|
<t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color" >
|
|
<t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color" >
|
|
|
<view v-if="column.custom == 'icon'" class="list-icon" @click.stop="pageTo({url:'/admin/item/detail',query:{id: item.productId}})">
|
|
<view v-if="column.custom == 'icon'" class="list-icon" @click.stop="pageTo({url:'/admin/item/detail',query:{id: item.productId}})">
|
|
|
<view class="icon-info">
|
|
<view class="icon-info">
|
|
@@ -72,31 +72,40 @@
|
|
|
</t-table>
|
|
</t-table>
|
|
|
</block>
|
|
</block>
|
|
|
<block v-else>
|
|
<block v-else>
|
|
|
- <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(putData.itemInfo)" />
|
|
|
|
|
|
|
+ <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(inStockData.itemInfo)" />
|
|
|
</block>
|
|
</block>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bar-view">
|
|
<view class="bar-view">
|
|
|
- <view class="info-view">数量:{{ sumCount }} 成本价:¥{{putData.price?parseFloat(putData.price):0}}</view>
|
|
|
|
|
- <view class="btn-view" v-if="putData.status == PUT_STATUS.CONFIRM">
|
|
|
|
|
- <button class="admin-button-com middle" @click="cancelPutEvent"> 取消入库 </button>
|
|
|
|
|
- <button class="admin-button-com middle" @click="confirmPutEvent"> 确认入库 </button>
|
|
|
|
|
|
|
+ <view class="info-view">数量:{{ sumCount }} 成本价:¥{{inStockData.price?parseFloat(inStockData.price):0}}</view>
|
|
|
|
|
+ <view class="btn-view">
|
|
|
|
|
+ <button class="admin-button-com middle" @click="putOut()"> 全部出库 </button>
|
|
|
|
|
+ <button class="admin-button-com middle" @click="cancelPutEvent" v-if="inStockData.status == 1"> 取消入库 </button>
|
|
|
|
|
+ <button class="admin-button-com middle" @click="confirmPutEvent" v-if="inStockData.status == 1"> 确认入库 </button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
|
|
+ <view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
|
|
+ <block v-for="(item, index) in list.data">
|
|
|
|
|
+ <button class="admin-button-com middle" @tap.stop="pitchShop(item,inStockData)">{{item.shopName}}</button>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import { PUT_STATUS } from "@/utils/declare";
|
|
import { PUT_STATUS } from "@/utils/declare";
|
|
|
-import { getStockInDetailApi, confirmOrderApi,cancelOrder } from "@/api/storehouse/stock";
|
|
|
|
|
|
|
+import { getList } from "@/api/shop";
|
|
|
|
|
+import { getStockInDetailApi, confirmOrderApi,cancelOrder,oneKeyStockOut } from "@/api/storehouse/stock";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
-
|
|
|
|
|
|
|
+import { list } from "@/mixins";
|
|
|
export default {
|
|
export default {
|
|
|
components: { AppWrapperEmpty },
|
|
components: { AppWrapperEmpty },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
PUT_STATUS,
|
|
PUT_STATUS,
|
|
|
orderSn: "",
|
|
orderSn: "",
|
|
|
- putData: {},
|
|
|
|
|
|
|
+ inStockData: {},
|
|
|
columns: [
|
|
columns: [
|
|
|
{ name: "名称", custom: "icon" },
|
|
{ name: "名称", custom: "icon" },
|
|
|
{ name: "库存", custom: "stock", width: 120, align: "center" },
|
|
{ name: "库存", custom: "stock", width: 120, align: "center" },
|
|
@@ -105,6 +114,7 @@ export default {
|
|
|
]
|
|
]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ mixins: [list],
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
const { orderSn } = options;
|
|
const { orderSn } = options;
|
|
|
if (orderSn) {
|
|
if (orderSn) {
|
|
@@ -116,8 +126,8 @@ export default {
|
|
|
sumCount() {
|
|
sumCount() {
|
|
|
let big = 0;
|
|
let big = 0;
|
|
|
let small = 0;
|
|
let small = 0;
|
|
|
- if (this.putData.itemInfo) {
|
|
|
|
|
- for (const item of this.putData.itemInfo) {
|
|
|
|
|
|
|
+ if (this.inStockData.itemInfo) {
|
|
|
|
|
+ for (const item of this.inStockData.itemInfo) {
|
|
|
if(item.bigNum && Number(item.bigNum)>0){
|
|
if(item.bigNum && Number(item.bigNum)>0){
|
|
|
big += Number(item.bigNum)
|
|
big += Number(item.bigNum)
|
|
|
}
|
|
}
|
|
@@ -139,10 +149,40 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ pitchShop(info,inStockData){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ this.$refs.selectFlowerNumRef.close()
|
|
|
|
|
+ this.$util.confirmModal({content:'确认出库到'+info.shopName+'?'},() => {
|
|
|
|
|
+ oneKeyStockOut({inShopId:info.id,orderSn:inStockData.orderSn}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.$msg(res.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ init(){
|
|
|
|
|
+ this.getShopList()
|
|
|
|
|
+ },
|
|
|
|
|
+ getShopList() {
|
|
|
|
|
+ return getList({
|
|
|
|
|
+ search: "",
|
|
|
|
|
+ type:this.tabIndex,
|
|
|
|
|
+ page: this.list.page,
|
|
|
|
|
+ pageSize: 100,
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (this.$util.isEmpty(res.data)){
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.completes(res);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ putOut(){
|
|
|
|
|
+ this.$refs.selectFlowerNumRef.open('top')
|
|
|
|
|
+ },
|
|
|
async initData() {
|
|
async initData() {
|
|
|
try {
|
|
try {
|
|
|
const { data } = await getStockInDetailApi(this.orderSn);
|
|
const { data } = await getStockInDetailApi(this.orderSn);
|
|
|
- this.putData = data;
|
|
|
|
|
|
|
+ this.inStockData = data;
|
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
|
},
|
|
},
|
|
|
getItemStatusName(status) {
|
|
getItemStatusName(status) {
|
|
@@ -272,4 +312,4 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|