shish 2 лет назад
Родитель
Сommit
5660575600

+ 15 - 3
ghsApp/src/admin/stat/stock.vue

@@ -18,7 +18,7 @@
 							<t-th>库存</t-th>
 							<t-th>大客价</t-th>
 							<t-th>批发价</t-th>
-							<t-th>零售价</t-th>
+							<t-th><view @click="clearAllStock()">零售价</view></t-th>
 						</t-tr>
 						<block v-if="!$util.isEmpty(classItemData)">
 							<block v-for="(classItem,classIndex) in classItemData" :key="classIndex">
@@ -81,8 +81,9 @@
 <script>
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import SelectList from "@/components/plugin/selectList";
-import { getProductDataApi } from "@/api/product/index";
+import { getProductDataApi } from "@/api/product";
 import { allOut } from "@/api/stock-out"
+import { clearStock } from "@/api/inventory";
 import { list } from "@/mixins";
 import ShopSelect from "@/components/module/shopSelect";
 import DateSelect from "@/components/module/dateSelect";
@@ -134,11 +135,22 @@ export default {
 		this.showStock()
 	},
 	methods: {
+		clearAllStock(){
+			let that = this
+			that.$util.confirmModal({content:'确认全部清除?'},() => {
+				clearStock().then(res=>{
+					if(res.code == 1){
+						that.$msg(res.msg)
+						that.showStock()
+					}
+				})
+			})
+		},
 		init(){
 
 		},
 		clearAll(){
-			this.$msg('功能开发中,请联系石头清空')
+			this.$msg('联系石头清空')
 		},
 		allOutSelectShop(flag){
 			//是否直接入库

+ 4 - 3
ghsApp/src/api/inventory/index.js

@@ -1,8 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
-/** *
- * 盘点列表
- */
+export const clearStock = data => {
+	return https.get("/check-order/clear-stock", data);
+};
+
 export const getCheckOrderListApi = data => {
 	return https.get("/check-order/list", data);
 };

+ 0 - 3
ghsApp/src/pagesOrder/arrival.vue

@@ -97,9 +97,6 @@ export default {
 			packCost:0
 		};
 	},
-	onShow() {
-		this.init();
-	},
 	onLoad(){
 		//返回上一页时不需要刷新
 		let pages = getCurrentPages();

+ 1 - 8
pt/src/saas/shop/shop.vue

@@ -104,14 +104,7 @@ export default {
           let that = this
           that.$refs['clearStockRef'].validate(valid => {
             if (valid) {
-              // that.$service.shop.addStaff(that.addStaffForm).then(res => {
-              //     if(res.id && Number(res.id)>0){
-              //       that.$message.success('操作成功')
-              //       that.addStaffPop = false
-              //       that.$refs['addStaffRef'].resetFields()
-              //       that.app.refresh()
-              //   }
-              // })
+
             } else {
               console.log('出错了哦');
               return false;