|
@@ -22,7 +22,8 @@
|
|
|
</block>
|
|
</block>
|
|
|
</view>
|
|
</view>
|
|
|
<div class="app-footer open_btn">
|
|
<div class="app-footer open_btn">
|
|
|
- <div @click="stockInAddEvent" class="admin-button-com big blue" style="margin-right:100upx;">入库花材盘点</div>
|
|
|
|
|
|
|
+ <div @click="getAllItem()" class="admin-button-com big default" style="margin-right:38upx;">全部花材下载</div>
|
|
|
|
|
+ <div @click="stockInAddEvent" class="admin-button-com big blue" style="margin-right:38upx;">入库花材盘点</div>
|
|
|
<div @click="addEvent" class="admin-button-com big blue">新增盘点</div>
|
|
<div @click="addEvent" class="admin-button-com big blue">新增盘点</div>
|
|
|
</div>
|
|
</div>
|
|
|
</view>
|
|
</view>
|
|
@@ -30,7 +31,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
-import { getCheckOrderListApi } from "@/api/inventory/index";
|
|
|
|
|
|
|
+import { getCheckOrderListApi } from "@/api/inventory";
|
|
|
|
|
+import { generateItemTable } from '@/api/product'
|
|
|
import { list } from "@/mixins";
|
|
import { list } from "@/mixins";
|
|
|
export default {
|
|
export default {
|
|
|
name: "panDianList",
|
|
name: "panDianList",
|
|
@@ -58,6 +60,37 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getAllItem(){
|
|
|
|
|
+ uni.showLoading({title:'下载中',mask:true})
|
|
|
|
|
+ generateItemTable({all:1}).then(res => {
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ let file = res.data.file
|
|
|
|
|
+ let shortFile = res.data.shortFile
|
|
|
|
|
+ uni.downloadFile({
|
|
|
|
|
+ url: file,
|
|
|
|
|
+ header: {"Content-Type": 'application/vnd.ms-excel'},
|
|
|
|
|
+ filePath: `${wx.env.USER_DATA_PATH}/${shortFile}`,
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ if (res.statusCode === 200) {
|
|
|
|
|
+ wx.saveFileToDisk({
|
|
|
|
|
+ filePath: res.filePath,
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ },
|
|
|
|
|
+ fail:function(res) {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ fail:()=>{
|
|
|
|
|
+ uni.showToast({title:'请用电脑打开小程序下载',mask:true,icon:'none'})
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
async init() {
|
|
async init() {
|
|
|
this._list();
|
|
this._list();
|
|
|
},
|
|
},
|