2 lines
6.5 KiB
JavaScript
2 lines
6.5 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7d8c8d91"],{"0aef":function(t,e,o){"use strict";o("a7c7")},a7c7:function(t,e,o){},f4df:function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t._self._c;return e("div",[e("el-row",[e("el-col",{attrs:{span:24}},[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",[e("el-row",[e("el-col",{attrs:{span:6}},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"col-form-label"},[t._v("工单编码:")]),e("label",[t._v(t._s(t.upShopHouseDetailInfo.orderId))])])]),e("el-col",{attrs:{span:6}},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"col-form-label"},[t._v("申请人:")]),e("label",[t._v(t._s(t.upShopHouseDetailInfo.personName))])])]),e("el-col",{attrs:{span:6}},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"col-form-label"},[t._v("申请时间:")]),e("label",[t._v(t._s(t.upShopHouseDetailInfo.createTime))])])]),e("el-col",{attrs:{span:6}},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"col-form-label"},[t._v("订单状态:")]),e("label",[t._v(t._s(t.upShopHouseDetailInfo.stateName))])])])],1),e("el-row",[e("el-col",{attrs:{span:24}},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"col-form-label"},[t._v("备注:")]),e("label",[t._v(t._s(t.upShopHouseDetailInfo.remark))])])])],1)],1)])],1)],1),e("el-row",[e("el-col",{attrs:{span:24}},[e("el-card",{staticClass:"box-card"},[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("商品信息")])]),e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.upShopHouseDetailInfo.inoutOrderProducts,stripe:""}},[e("el-table-column",{attrs:{prop:"index",label:"序号",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.$index+1)+" ")]}}])}),e("el-table-column",{attrs:{prop:"prodName",label:"商品名称",align:"center"}}),e("el-table-column",{attrs:{prop:"productId",label:"商品编号",align:"center"}}),e("el-table-column",{attrs:{prop:"specName",label:"规格",align:"center"}}),e("el-table-column",{attrs:{prop:"prodCount",label:"申请单数量",align:"center"}}),e("el-table-column",{attrs:{label:"实际出库数量",align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("el-input",{attrs:{type:"number"},model:{value:o.row.actCount,callback:function(e){t.$set(o.row,"actCount",e)},expression:"scope.row.actCount"}})]}}])}),e("el-table-column",{attrs:{prop:"price",label:"价格",align:"center"}}),e("el-table-column",{attrs:{prop:"amount",label:"金额",align:"center"}}),e("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return["5005"==o.row.state?e("el-button-group",[e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t._doCancelProduct(o.row)}}},[t._v("取消出库")])],1):t._e(),"4004"==o.row.state?e("el-button-group",[e("el-button",{attrs:{size:"mini",disabled:""}},[t._v("已取消")])],1):t._e()]}}])})],1),"5005"==t.upShopHouseDetailInfo.state?e("div",{staticStyle:{"margin-top":"20px"}},[e("el-button",{staticStyle:{float:"right"},attrs:{type:"primary"},on:{click:t.doInoutOrder}},[e("i",{staticClass:"el-icon-check"}),t._v(" 确定出库 ")]),e("el-button",{staticStyle:{float:"right","margin-right":"20px"},attrs:{type:"warning"},on:{click:t._doCancelOrder}},[e("i",{staticClass:"el-icon-close"}),t._v(" 取消出库单 ")])],1):t._e()],1)],1)],1)],1)},s=[],r=o("b775");function l(t){return new Promise((e,o)=>{Object(r["a"])({url:"/inoutOrder.listInoutOrder",method:"get",params:t}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function n(t){return new Promise((e,o)=>{Object(r["a"])({url:"/inoutOrder.listInoutOrderProduct",method:"get",params:t}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function c(t){return new Promise((e,o)=>{Object(r["a"])({url:"/inoutOrder.saveOrderOut",method:"post",data:t,headers:{"Content-Type":"application/json"}}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function i(t){return new Promise((e,o)=>{Object(r["a"])({url:"/inoutOrder.updateInoutOrder",method:"post",data:t,headers:{"Content-Type":"application/json"}}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function u(t){return new Promise((e,o)=>{Object(r["a"])({url:"/inoutOrderProduct.updateInoutOrderProduct",method:"post",data:t,headers:{"Content-Type":"application/json"}}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}var d=o("7323"),p={data(){return{upShopHouseDetailInfo:{orderId:"",stateName:"",state:"",personName:"",createTime:"",personId:"",remark:"",orderType:"",shopId:"",inoutOrderProducts:[]}}},created(){this.upShopHouseDetailInfo.shopId=Object(d["f"])();const t=this.$route.query.orderId;if(!t)return this.$message.error("非法操作"),void this.$router.go(-1);this.upShopHouseDetailInfo.orderId=t,this._listOrder(),this._listInoutOrderProduct()},methods:{async _listOrder(){try{const t=await l({page:1,row:1,orderId:this.upShopHouseDetailInfo.orderId});Object.assign(this.upShopHouseDetailInfo,t.data[0])}catch(t){console.error("请求失败:",t)}},async _listInoutOrderProduct(){try{const t=await n({page:1,row:50,orderId:this.upShopHouseDetailInfo.orderId,shopId:this.upShopHouseDetailInfo.shopId});this.upShopHouseDetailInfo.inoutOrderProducts=t.data,this.upShopHouseDetailInfo.inoutOrderProducts.forEach(t=>{t.actCount=t.prodCount})}catch(t){console.error("请求失败:",t)}},async doInoutOrder(){try{const t=await c(this.upShopHouseDetailInfo);0===t.code&&(this.$message.success("出库成功"),this.$router.go(-1))}catch(t){this.$message.error(t)}},async _doCancelOrder(){this.upShopHouseDetailInfo.state="6006";try{const t=await i(this.upShopHouseDetailInfo);if(0===t.code){const e={orderId:this.upShopHouseDetailInfo.orderId,statusCd:"0",state:"6006"};this.upShopHouseDetailInfo.inoutOrderProducts.forEach(t=>{t.state="6006"}),this.upShopHouseDetailInfo.stateName="入库失败",this._doCancelProduct(e),this.$message.success(t.msg)}else this.$message.error(t.msg)}catch(t){this.$message.error(t)}},async _doCancelProduct(t){t.state="6006";try{const e=await u(t);0===e.code?this.$message.success(e.msg):this.$message.error(e.msg)}catch(e){this.$message.error(e)}},_goBack(){this.$router.go(-1)}}},h=p,f=(o("0aef"),o("2877")),m=Object(f["a"])(h,a,s,!1,null,"e8770532",null);e["default"]=m.exports}}]);
|
|
//# sourceMappingURL=chunk-7d8c8d91.36d38840.js.map
|