Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-5cd4d8fa.22126df1.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
5.4 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5cd4d8fa"],{3220:function(t,e,a){},a92c:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",[e("el-card",{staticClass:"box-card"},[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("资产订单")]),e("div",[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t._goBack}},[e("i",{staticClass:"el-icon-close"}),t._v(" 返回 ")])],1)]),e("div",{staticClass:"form-content"},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("div",{staticClass:"form-item"},[e("label",[t._v("选择仓库")]),e("div",[t._v(t._s(t.assetInventoryInStockInfo.shName))])])]),e("el-col",{attrs:{span:12}},[e("div",{staticClass:"form-item"},[e("label",[t._v("盘点日期")]),e("div",[t._v(t._s(t.assetInventoryInStockInfo.invTime))])])])],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:24}},[e("div",{staticClass:"form-item"},[e("label",[t._v("盘点说明")]),e("div",[t._v(t._s(t.assetInventoryInStockInfo.remark))])])])],1)],1)]),e("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"20px"}},[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("入库商品")])]),e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.assetInventoryInStockInfo.inoutOrderProducts,border:""}},[e("el-table-column",{attrs:{prop:"productId",label:"编号",align:"center"}}),e("el-table-column",{attrs:{prop:"prodName",label:"名称",align:"center"}}),e("el-table-column",{attrs:{prop:"specName",label:"规格",align:"center"}}),e("el-table-column",{attrs:{prop:"price",label:"单价",align:"center"}}),e("el-table-column",{attrs:{prop:"quantity",label:"账面数量",align:"center"}}),e("el-table-column",{attrs:{prop:"invQuantity",label:"盘点数量",align:"center"}}),e("el-table-column",{attrs:{prop:"willExpire",label:"将过期",align:"center"}}),e("el-table-column",{attrs:{prop:"attrition",label:"耗损",align:"center"}}),e("el-table-column",{attrs:{prop:"invProfit",label:"盘盈",align:"center"}}),e("el-table-column",{attrs:{prop:"invLoss",label:"盘亏",align:"center"}}),e("el-table-column",{attrs:{prop:"invProfitMoney",label:"盘盈金额",align:"center"}}),e("el-table-column",{attrs:{prop:"invLossMoney",label:"盘亏金额",align:"center"}}),e("el-table-column",{attrs:{prop:"stateName",label:"状态",align:"center"}}),e("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return["4466"!=a.row.state?e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t._inStock(a.row.detailId)}}},[t._v(" 入库 ")]):t._e()]}}])})],1)],1),e("div",{staticClass:"action-buttons"},[e("el-button",{staticStyle:{"margin-right":"20px"},attrs:{type:"warning"},on:{click:t._goBack}},[e("i",{staticClass:"el-icon-close"}),t._v(" 取消 ")]),e("el-button",{attrs:{type:"primary"},on:{click:t._inStock}},[e("i",{staticClass:"el-icon-check"}),t._v(" 批量入库 ")])],1)],1)},s=[],o=a("7323"),r=a("b775");function i(t){return new Promise((e,a)=>{Object(r["a"])({url:"/assetInventory.queryAssetInventory",method:"get",params:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function l(t){return new Promise((e,a)=>{Object(r["a"])({url:"/inventory.queryAssetInventoryProduct",method:"get",params:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function c(t){return new Promise((e,a)=>{Object(r["a"])({url:"/assetInventory.assetInventoryInStock",method:"post",data:t,headers:{"Content-Type":"application/json"}}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}var d={data(){return{assetInventoryInStockInfo:{aiId:"",shId:"",shName:"",invTime:"",inoutOrderProducts:[],remark:"",shopId:""}}},created(){this.assetInventoryInStockInfo.aiId=this.$route.query.aiId,this._queryAssetInventory(),this.queryAssetInventoryProduct()},methods:{async _inStock(t){let e=[];if(t?e.push({detailId:t,shopId:Object(o["f"])()}):this.assetInventoryInStockInfo.inoutOrderProducts.forEach(t=>{"4466"!=t.state&&e.push({detailId:t.detailId,shopId:Object(o["f"])()})}),e.length<1)return void this.$message.warning("没有待入库的商品");let a={aiId:this.assetInventoryInStockInfo.aiId,shopId:Object(o["f"])(),products:e};try{const t=await c(a);0===t.code?(this.$message.success(t.msg),this._goBack()):this.$message.error(t.msg)}catch(n){this.$message.error("请求失败"),console.error(n)}},_goBack(){this.$router.go(-1)},async _queryAssetInventory(){const t={page:1,row:1,aiId:this.assetInventoryInStockInfo.aiId,shopId:Object(o["f"])()};try{const e=await i(t);Object.assign(this.assetInventoryInStockInfo,e.data[0])}catch(e){console.error("请求失败:",e)}},async queryAssetInventoryProduct(){const t={page:1,row:100,aiId:this.assetInventoryInStockInfo.aiId,shopId:Object(o["f"])()};try{const e=await l(t);e.data.forEach(t=>{this._computeData(t)}),this.assetInventoryInStockInfo.inoutOrderProducts=e.data}catch(e){console.error("请求失败:",e)}},_computeData(t){t.invProfit=parseInt(t.invQuantity)-parseInt(t.quantity),t.invProfit<0&&(t.invProfit=0),t.invLoss=parseInt(t.quantity)-parseInt(t.invQuantity),t.invLoss<0&&(t.invLoss=0),t.invProfitMoney=t.invProfit*parseFloat(t.price),t.invLossMoney=t.invLoss*parseFloat(t.price),this.$forceUpdate()}}},u=d,p=(a("e4b6"),a("2877")),I=Object(p["a"])(u,n,s,!1,null,"740ae246",null);e["default"]=I.exports},e4b6:function(t,e,a){"use strict";a("3220")}}]);
//# sourceMappingURL=chunk-5cd4d8fa.22126df1.js.map