chunk-5bbfac1e.9ac1c27b.js 34 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5bbfac1e"],{"1e21":function(t,e,a){"use strict";a.r(e);var n=a("1da1"),o=(a("96cf"),a("e9c4"),a("d3b7"),{}),r=(window.ajaxTimeout=2e4,Object(n.a)(regeneratorRuntime.mark((function t(){var e,a,r,i,l,s,c=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<c.length&&void 0!==c[0]?c[0]:"",r=3<c.length&&void 0!==c[3]?c[3]:{},i=4<c.length&&void 0!==c[4]?c[4]:o,l=5<c.length?c[5]:void 0,a=e.method.toLowerCase(),s={method:a,baseURL:"",url:e.url,data:e.data,params:r,processData:!0,timeout:window.ajaxTimeout,headers:i,onUploadProgress:l},l&&"function"==typeof l&&(s.onUploadProgress=l),axios.interceptors.request.use((function(t){return t}),(function(t){return Promise.reject(new Error("服务器异常,请联系管理员!"))})),axios.interceptors.response.use(function(){var t=Object(n.a)(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),(function(t){return Promise.reject(t.response.data)})),t.abrupt("return",new Promise((function(t,e){axios(s).then((function(e){t(e.data)})).catch((function(t){e(t)}))})));case 12:case"end":return t.stop()}}),t)})))),i="http://stock.test241.wanyuhengtong.com/",l="http://stock.api.wanyuhengtong.com/";function s(t){t=JSON.parse(JSON.stringify(t));var e=t.full;return delete t.full,r({url:"".concat("/good-share"===e?l:i,"admin/projectsharelist"),method:"post",data:t})}a("159b"),a("a434"),a("d81d"),a("b0c0"),a("ac1f"),a("1276"),a("a9e3"),a("5319"),a("b680");var c=[{prop:"pgNo",label:"商品要求编码",width:"155px"},{prop:"spuCode",label:"商品编号",width:"155px"},{prop:"good_img",label:"图片",_solt_:"good_img",width:"50px"},{prop:"good_name",label:"商品名称"},{prop:"class_cat",label:"商品分类",width:"180px"},{prop:"unit_name",label:"单位",width:"50px"},{prop:"brand_name",label:"品牌",width:"80px"},{prop:"work_day",label:"制作工期",width:"70px"},{prop:"delivery_day",label:"物流时间",width:"70px"}],u=[{type:"selection",fixed:"left",_noset_:!0},{prop:"pgNo",label:"商品要求编码",width:"155px"},{prop:"spuCode",label:"商品编号",width:"155px"},{prop:"good_img",label:"图片",_solt_:"good_img",width:"50px"},{prop:"good_name",label:"商品名称"},{prop:"class_cat",label:"商品分类",width:"180px"},{prop:"unit_name",label:"单位",width:"50px"},{prop:"brand_name",label:"品牌",width:"80px"},{prop:"work_day",label:"制作工期",width:"70px"},{prop:"delivery_day",label:"物流时间",width:"70px"}],p={name:"changeBackGood",props:["showModel","sitem","id","type","newTime"],mixins:[{methods:{logout:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("/login"!==t.$route.path)return e.next=3,t.$store.dispatch("user/logout");e.next=4;break;case 3:t.$router.push("/login?redirect=".concat(t.$route.fullPath));case 4:case"end":return e.stop()}}),e)})))()},routeGoto:function(t,e){return Object(n.a)(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:window.vm.$router.push({path:t,query:e});case 1:case"end":return a.stop()}}),a)})))()},routeReGoto:function(t,e){return Object(n.a)(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:window.vm.$router.replace({path:t,query:e});case 1:case"end":return a.stop()}}),a)})))()},setNum:function(t){return t?parseFloat(t+"").toFixed(2):"-"}}}],data:function(){return{loading:!1,allList:[],index:0,projectNo:"",status:"",statusOptions:[{value:"1",label:"竞品"},{value:"2",label:"竞聘"}],sitemStatusoptions:[{value:"1",label:"待商品反馈"},{value:"2",label:"待项目反馈商品选择"},{value:"3",label:"待项目方案制定"},{value:"4",label:"待方案选择"},{value:"5",label:"项目结束"}],tableData:[],table:{stripe:!0,border:!0,"max-height":"450px"},good_change_columns:u}},mounted:function(){this.initForm()},methods:{initForm:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,t.tableData=[],e.next=4,t.initListData();case 4:return t.loading=!1,e.next=8,t.searchList(t.index);case 8:case"end":return e.stop()}}),e)})))()},next:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===t.allList[t.index].selection.length)return t.$message.warning("至少选择一个商品!"),e.abrupt("return");e.next=4;break;case 4:if(t.index+1!==t.allList.length)return t.index++,e.next=8,t.searchList(t.index);e.next=10;break;case 8:e.next=12;break;case 10:return e.next=12,t.$confirm("确定要保存么?","商品只能选择一次!",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.submitForm();case 2:case"end":return e.stop()}}),e)})))).catch((function(){}));case 12:case"end":return e.stop()}}),e)})))()},deleteItem:function(t){var e=this;JSON.parse(JSON.stringify(this.allList[this.index].selection)).forEach((function(a,n){a.spuCode===e.tableData[t].spuCode&&e.allList[e.index].selection.splice(n,1)})),this.tableData.splice(t,1)},submitForm:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var a,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.loading){e.next=21;break}return t.loading=!0,a=JSON.parse(JSON.stringify(t.tableData)),n={feedid:[]},a.forEach((function(t){n.feedid.push(t.id)})),n.full=t.$route.path,e.next=8,s=n,c=void 0,c=(s=JSON.parse(JSON.stringify(s))).full,delete s.full,r({url:"".concat("/good-share"===c?l:i,"admin/projectsharecheck"),method:"post",data:s});case 8:if(o=e.sent,t.loading=!1,!o||0!==o.code){e.next=15;break}t.$notify.success({title:"保存成功!",message:""}),t.$emit("refresh"),e.next=21;break;case 15:if(o&&100<=o.code&&o.code<=104)return e.next=18,t.logout();e.next=20;break;case 18:e.next=21;break;case 20:t.$message.warning(o.message);case 21:case"end":return e.stop()}var s,c}),e)})))()},handleSelectionChange:function(t){this.allList[this.index].selection=JSON.parse(JSON.stringify(t));var e=[];this.allList.forEach((function(t,a){t=t.selection,t&&0<t.length&&t.forEach((function(t){t=JSON.parse(JSON.stringify(t)),t.noIndex=a+1,e.push(t)}))})),this.tableData=JSON.parse(JSON.stringify(e))},selection_change:function(t){t=t.list;var e=(this.allList[this.index].selection=JSON.parse(JSON.stringify(t)),[]);this.allList.forEach((function(t,a){t=t.selection,t&&0<t.length&&t.forEach((function(t){t=JSON.parse(JSON.stringify(t)),t.noIndex=a+1,e.push(t)}))})),this.tableData=JSON.parse(JSON.stringify(e))},initListData:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var a,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.allList=[],o=t.sitem,a=o.projectNo,n=o.ladder,o=o.status,t.status=o,t.projectNo=a,n&&0<n.length&&n.forEach((function(e){e=JSON.parse(JSON.stringify(e)),e={ladder:[e],pageInfo:{size:10,curr:1,total:0},pgNo:e.pgNo,loading:!0,selection:[],tableData:[]},t.allList.push(e)}));case 5:case"end":return e.stop()}}),e)})))()},allSearchList:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.allList&&0<t.allList.length&&t.allList.forEach(function(){var e=Object(n.a)(regeneratorRuntime.mark((function e(a,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.searchList(n);case 2:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})))()},handlePageChange:function(t,e){var a=this;return Object(n.a)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a.allList[e].pageInfo.curr=t,n.next=3,a.searchList(e);case 3:case"end":return n.stop()}}),n)})))()},handleSizeChange:function(t,e){var a=this;return Object(n.a)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a.allList[e].pageInfo.curr=1,a.allList[e].pageInfo.size=t,n.next=4,a.searchList(e);case 4:case"end":return n.stop()}}),n)})))()},searchList:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function a(){var n,o,r,i,l;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return r=e.allList[t],i=r.pageInfo,r=r.pgNo,n=i.size,i=i.curr,e.allList[t].loading=!0,(i={page:i,size:n,zxNo:"",infoNo:"",bidNo:"",pgNo:r,status:"3"===e.status?"1":"",projectNo:e.projectNo}).full=e.$route.path,e.allList[t].tableData=[],a.next=8,s(i);case 8:if(n=a.sent,o=n.code,r=n.data,0!==o){a.next=19;break}i=r.list,l=r.count,e.allList[t].tableData=i,e.allList[t].tableData.map((function(t){return t.class_cat="",t.can&&0<t.can.length&&t.can.forEach((function(e,a){t.class_cat+=0===a?e.name:"_"+e.name})),t.good_img&&(t.good_img="[object Array]"===Object.prototype.toString.call(t.good_img)?t.good_img:(t.good_img||"").split(",")),t})),e.allList[t].tableData.forEach((function(a,n){e.$set(e.allList[t].tableData,n,a)})),e.allList[t].pageInfo.total=Number(l),a.next=26;break;case 19:if(100<=o&&o<=104)return a.next=22,e.logout();a.next=24;break;case 22:a.next=26;break;case 24:e.allList[t].tableData=[],e.allList[t].pageInfo.total=0;case 26:e.allList[t].loading=!1;case 27:case"end":return a.stop()}}),a)})))()}}},d=(a("4d1f"),a("2877")),m=(p=Object(d.a)(p,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"choice-goods"},[a("div",{staticClass:"top"},[t.allList[t.index]?a("div",[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.allList[t.index].loading,expression:"allList[index].loading"}],staticClass:"project-backGoodShow"},[a("div",{staticClass:"project-backGoodShow-main"},[a("div",{staticClass:"project-backGoodShow-title"},[t._v(" 商品要求"+t._s(t.index+1)+" "),a("el-button-group",{staticClass:"fr",staticStyle:{margin:"8px 0 0 0"},attrs:{size:"mini"}},[0!==t.index?a("el-button",{staticClass:"fr",attrs:{type:"primary",size:"mini",icon:"el-icon-arrow-left"},on:{click:function(e){t.index--}}},[t._v("上一个")]):t._e(),t.index+1!==t.allList.length?a("el-button",{staticClass:"fr",attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.next()}}},[t._v("下一个"),a("i",{staticClass:"el-icon-arrow-right el-icon--right",attrs:{size:"mini"}})]):t._e(),t.index+1===t.allList.length?a("el-button",{staticClass:"fr",attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.next()}}},[t._v("提交"),a("i",{staticClass:"el-icon-upload el-icon--right"})]):t._e()],1)],1),a("div",{staticClass:"project-backGoodShow-ask-table"},[t.allList[t.index].ladder?[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.allList[t.index].ladder,size:"mini",border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"good_type",label:"商品类型",width:"80px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{size:"mini"},domProps:{textContent:t._s((t.statusOptions.find((function(t){return t.value==e.row.good_type}))||{}).label||"--")}})]}}],null,!1,2144751808)}),a("el-table-column",{attrs:{prop:"budget_price",label:"预算单价",width:"110"}}),a("el-table-column",{attrs:{prop:"num",label:"购买数量",width:"110"}}),a("el-table-column",{attrs:{prop:"cat_name",label:"商品分类"}}),a("el-table-column",{attrs:{prop:"good_img",label:"图片",width:"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.good_img?a("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"hover",staticStyle:{width:"20px",height:"20px"}},[a("img",{staticStyle:{display:"inline-block",width:"100%",height:"100%"},attrs:{src:e.row.good_img,alt:""}})]):t._e()]}}],null,!1,4291532340)}),a("el-table-column",{attrs:{prop:"good_name",label:"商品名称"}})],1)]:t._e()],2),a("div",{staticClass:"project-backGoodShow-title"},[t._v("商品反馈情况")]),t.allList[t.index].tableData&&t.allList[t.index].tableData.length?a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.allList[t.index].loading,expression:"allList[index].loading"}],staticClass:"project-backGoodShow-backGood-table"},[a("el-table",{ref:"multipleTable",staticStyle:{width:"100%","margin-bottom":"10px"},attrs:{data:t.allList[t.index].tableData,"row-key":"id",border:"",stripe:"",size:"mini"},on:{"selection-change":function(e){return t.handleSelectionChange(e)}}},[a("el-table-column",{attrs:{type:"selection",fixed:"left","min-width":"40","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"pgNo",label:"商品要求编码","min-width":"156px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"spuCode",label:"商品编号","min-width":"156px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"good_img",label:"商品图片","min-width":"242px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.good_img&&0<e.row.good_img.length?a("div",t._l(e.row.good_img,(function(t,e){return a("img",{directives:[{name:"viewer",rawName:"v-viewer"}],key:t+e,staticClass:"hover fl",staticStyle:{display:"inline-block",width:"20px",height:"20px",margin:"0 2px 0 0"},attrs:{src:t,alt:""}})})),0):t._e()]}}],null,!1,2040352965)}),a("el-table-column",{attrs:{prop:"good_name",label:"商品名称","min-width":"180px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"class_cat",label:"商品分类","min-width":"180px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"unit_name",label:"单位","min-width":"50px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"brand_name",label:"品牌","min-width":"80px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"work_day",label:"制作工期","min-width":"70px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"delivery_day",label:"物流时间","min-width":"70px","show-overflow-tooltip":""}})],1),t.allList[t.index].tableData?a("div",{staticClass:"Pagination",staticStyle:{"text-align":"right"}},[a("el-pagination",{attrs:{"current-page":t.allList[t.index].pageInfo.curr,"page-size":t.allList[t.index].pageInfo.size,size:"mini",layout:"total, prev, pager, next, jumper",total:t.allList[t.index].pageInfo.total},on:{"size-change":function(e){return t.handleSizeChange(e,t.index)},"current-change":function(e){return t.handlePageChange(e,t.index)}}})],1):t._e()],1):t._e()])])]):t._e()]),a("div",{staticClass:"bottom"},[a("div",{staticClass:"table-main clear"},[a("div",{staticClass:"table-main-index",staticStyle:{"padding-top":"40px"}},[t._v(" 已选中的商品 ")]),a("div",{staticClass:"table-main-last"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"",height:"168px",size:"mini"}},[a("el-table-column",{attrs:{prop:"pgNo",label:"商品要求编码","min-width":"156px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"spuCode",label:"商品编号","min-width":"156px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"good_img",label:"商品图片","min-width":"242px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.good_img&&0<e.row.good_img.length?a("div",t._l(e.row.good_img,(function(t,e){return a("img",{directives:[{name:"viewer",rawName:"v-viewer"}],key:t+e,staticClass:"hover fl",staticStyle:{display:"inline-block",width:"20px",height:"20px",margin:"0 2px 0 0"},attrs:{src:t,alt:""}})})),0):t._e()]}}])}),a("el-table-column",{attrs:{prop:"good_name",label:"商品名称","min-width":"180px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"class_cat",label:"商品分类","min-width":"180px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"unit_name",label:"单位","min-width":"50px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"brand_name",label:"品牌","min-width":"80px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"work_day",label:"制作工期","min-width":"70px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"delivery_day",label:"物流时间","min-width":"70px","show-overflow-tooltip":""}})],1)],1)])])])}),[],!1,null,"16ad8cfc",null).exports,a("99af"),{name:"changeBackGood",props:["showModel","sitem","id","type","newTime"],watch:{newTime:function(t){this.initForm()}},data:function(){return{loading:!1,allPlanList:[],index:0,total:0,pageInfo:{size:10,curr:1,total:0},ladder:[],plan_table:[],tableData:[],projectNo:"",status:"",statusOptions:[{value:"1",label:"竞品"},{value:"2",label:"竞聘"}],sitemStatusoptions:[{value:"1",label:"待商品反馈"},{value:"2",label:"待项目反馈商品选择"},{value:"3",label:"待项目方案制定"},{value:"4",label:"待方案选择"},{value:"5",label:"项目结束"}],table:{stripe:!0,border:!0},good_show_columns:c,plan_show:{sale_total:"0",feedback:[]}}},mounted:function(){this.initForm()},methods:{initForm:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,t.tableData=[],e.next=4,t.initListData();case 4:return e.next=6,t.get_plan();case 6:t.loading=!1;case 7:case"end":return e.stop()}}),e)})))()},add_plan:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=JSON.parse(JSON.stringify(t.allPlanList[t.index])),o=a.planNo,"1"===a.status)return t.$message.warning("该方案已选中!不能再选!"),e.abrupt("return");e.next=4;break;case 4:return e.next=6,t.$confirm("方案只能选择一次,您确定选定该方案么?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n.a)(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,(a={planNos:[o],status:"1"}).full=t.$route.path,e.next=5,n=a,s=void 0,s=(n=JSON.parse(JSON.stringify(n))).full,delete n.full,r({url:"".concat("/good-share"===s?l:i,"admin/plancheck"),method:"post",data:n});case 5:(a=e.sent)&&0===a.code?(t.loading=!1,t.$notify.success({title:"方案选择成功!",message:""}),t.$emit("refresh")):(t.loading=!1,t.$message.warning(a.message));case 7:case"end":return e.stop()}var n,s}),e)})))).catch((function(){}));case 6:case"end":return e.stop()}}),e)})))()},initListData:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var a,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.allList=[],o=t.sitem,a=o.projectNo,n=o.ladder,o=o.status,t.status=o,t.projectNo=a,t.ladder=JSON.parse(JSON.stringify(n)),t.tableData=[],e.next=8,t.searchList();case 8:case"end":return e.stop()}}),e)})))()},handlePageChange:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e.pageInfo.curr=t,a.next=3,e.searchList();case 3:case"end":return a.stop()}}),a)})))()},handleSizeChange:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e.pageInfo.curr=1,e.pageInfo.size=t,a.next=4,e.searchList();case 4:case"end":return a.stop()}}),a)})))()},searchList:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var a,n,o,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.pageInfo,a=n.size,n=n.curr,t.loading=!0,(n={page:n,size:a,zxNo:"",infoNo:"",bidNo:"",pgNo:"",status:"1",projectNo:t.projectNo}).full=t.$route.path,e.next=6,s(n);case 6:a=e.sent,n=a.code,r=a.data,0===n?(o=r.list,r=r.count,t.tableData=o,t.tableData.map((function(t){return t.class_cat="",t.can&&0<t.can.length&&t.can.forEach((function(e,a){t.class_cat+=0===a?e.name:"_"+e.name})),t.model="",t.specinfo&&0<t.specinfo.length&&t.specinfo.forEach((function(e,a){t.model+="".concat(0!==a?"--":"").concat(e.spec_name,"[").concat(e.spec_value_name,"]")})),t.good_img&&(t.good_img="[object Array]"===Object.prototype.toString.call(t.good_img)?t.good_img:(t.good_img||"").split(",")),t})),t.pageInfo.total=Number(r)):(t.tableData=[],t.pageInfo.total=0),t.loading=!1;case 11:case"end":return e.stop()}}),e)})))()},get_plan:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var a,n,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a={projectNo:t.projectNo,type:"5"===t.status||"6"===t.status?"1":""}).full=t.$route.path,e.next=4,c=a,u=void 0,u=(c=JSON.parse(JSON.stringify(c))).full,delete c.full,r({url:"".concat("/good-share"===u?l:i,"admin/projectshareplan"),method:"post",data:c});case 4:if(a=e.sent,n=a.code,o=a.data,s=a.message,0!==n){e.next=23;break}if(0<o.length)return t.allPlanList=JSON.parse(JSON.stringify(o)),t.total=t.allPlanList.length,t.index=0,e.next=15,t.change_plan("1");e.next=17;break;case 15:e.next=21;break;case 17:t.allPlanList=[],t.total=0,t.index=0,t.plan_show={sale_total:"0",feedback:[]};case 21:e.next=24;break;case 23:t.$message.warning(s);case 24:case"end":return e.stop()}var c,u}),e)})))()},change_plan:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function a(){var n,o,r;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(e.plan_show={sale_total:"0",feedback:[]},t&&(e.index=0),o=JSON.parse(JSON.stringify(e.allPlanList[e.index])),n=o.sale_total,o=o.feedback,e.plan_show={sale_total:n,feedback:JSON.parse(JSON.stringify(o))},r=0;r<e.plan_show.feedback.length;r++)e.plan_show.feedback[r].good_img="[object Array]"===Object.prototype.toString.call(e.plan_show.feedback[r].good_img)?e.plan_show.feedback[r].good_img:(e.plan_show.feedback[r].good_img||"").split(","),e.$set(e.plan_show.feedback[r],r,e.plan_show.feedback[r]);case 6:case"end":return a.stop()}}),a)})))()}}});a("ad10"),p={name:"goodShare",components:{changeBackGood:p,showBackGood:Object(d.a)(m,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"showbackgood"},[a("div",{staticClass:"slist-card"},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"project-backGoodShow"},[a("div",{staticClass:"project-backGoodShow-main"},[a("div",{staticClass:"project-backGoodShow-title"},[t._v("商品要求")]),a("div",{staticClass:"project-backGoodShow-ask-table"},[t.ladder?[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.ladder,size:"mini",border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"pgNo",label:"商品要求编码",width:"160","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"good_type",label:"商品类型",width:"80px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{size:"mini"},domProps:{textContent:t._s((t.statusOptions.find((function(t){return t.value==e.row.good_type}))||{}).label||"--")}})]}}],null,!1,3303362624)}),a("el-table-column",{attrs:{prop:"budget_price",label:"预算单价",width:"110","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"num",label:"购买数量",width:"110","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"cat_name",label:"商品分类","min-width":"110","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.cat_info,(function(e,n){return a("span",{key:e.id+n},[t._v(" "+t._s(0===n?"":"_")+t._s(e.name)+" ")])}))}}],null,!1,1060988773)}),a("el-table-column",{attrs:{prop:"good_name",label:"商品名称","min-width":"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.good_img?a("img",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"hover fl",staticStyle:{display:"inline-block",width:"20px",height:"20px",margin:"2px 0 0 0"},attrs:{src:e.row.good_img,alt:""}}):t._e(),a("span",{staticStyle:{"vertical-align":"top",display:"inline-block"}},[t._v(t._s(e.row.good_name))])]}}],null,!1,2592238478)})],1)]:t._e()],2),a("div",{staticClass:"project-backGoodShow-title"},[t._v("商品反馈情况")]),a("div",{staticClass:"project-backGoodShow-backGood-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%","margin-bottom":"10px"},attrs:{"row-key":"id",border:"",stripe:"",size:"mini",data:t.tableData}},[a("el-table-column",{attrs:{prop:"pgNo",label:"商品要求编码","min-width":"156px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"spuCode",label:"商品编号","min-width":"156px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"good_img",label:"商品图片","min-width":"242px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.good_img&&0<e.row.good_img.length?a("div",t._l(e.row.good_img,(function(t,e){return a("img",{directives:[{name:"viewer",rawName:"v-viewer"}],key:t+e,staticClass:"hover fl",staticStyle:{display:"inline-block",width:"20px",height:"20px",margin:"0 2px 0 0"},attrs:{src:t,alt:""}})})),0):t._e()]}}])}),a("el-table-column",{attrs:{prop:"good_name",label:"商品名称","min-width":"180px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"class_cat",label:"商品分类","min-width":"180px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"unit_name",label:"单位","min-width":"50px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"brand_name",label:"品牌","min-width":"80px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"work_day",label:"制作工期","min-width":"70px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"delivery_day",label:"物流时间","min-width":"70px","show-overflow-tooltip":""}})],1),t.tableData?a("div",{staticClass:"Pagination",staticStyle:{"text-align":"right"}},[a("el-pagination",{attrs:{"current-page":t.pageInfo.curr,"page-size":t.pageInfo.size,size:"mini",layout:"total, prev, pager, next, jumper",total:t.pageInfo.total},on:{"size-change":function(e){return t.handleSizeChange(e)},"current-change":function(e){return t.handlePageChange(e)}}})],1):t._e()],1),0!==t.total?a("div",{staticClass:"project-backGoodShow-title"},[a("span",{staticClass:"fl"},[t._v(" "+t._s("5"===t.status||"6"===t.status?"已选定方案":"选择方案"))]),"4"===t.status?a("el-button-group",{staticClass:"fr",staticStyle:{margin:"8px 0 0 0"},attrs:{size:"mini"}},[0!==t.total?a("el-button",{staticClass:"fr",attrs:{type:"primary",size:"mini",disabled:0===t.index,icon:"el-icon-arrow-left"},on:{click:function(e){t.index--,t.change_plan()}}}):t._e(),0!==t.total?a("el-button",{staticClass:"fr",staticStyle:{height:"29px"},attrs:{type:"primary",size:"mini"}},[t._v("方案共"+t._s(t.index+1)+"/"+t._s(t.total))]):t._e(),0!==t.total?a("el-button",{staticClass:"fr",attrs:{type:"primary",disabled:t.index+1===t.total,size:"mini"},on:{click:function(e){t.index++,t.change_plan()}}},[a("i",{staticClass:"el-icon-arrow-right el-icon--right",attrs:{size:"mini"}})]):t._e(),0!==t.total?a("el-button",{staticClass:"fr",attrs:{type:"primary",icon:"el-icon-circle-plus-outline",size:"mini"},on:{click:t.add_plan}},[t._v("选定方案,并提交 ")]):t._e()],1):t._e(),t.plan_show?a("span",{staticClass:"fl",staticStyle:{"font-size":"13px",color:"#e4393c",padding:"0 0 0 20px"}},[t._v("方案总金额:"+t._s(t.plan_show.sale_total)+"元")]):t._e()],1):t._e(),t.plan_show&&t.plan_show.feedback&&t.plan_show.feedback.length?a("div",{staticClass:"project-setPlan-backGood-table"},[a("el-table",{ref:"multipleTable"+t.index,staticStyle:{width:"100%"},attrs:{data:t.plan_show.feedback,size:"mini",border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"pgNo",label:"要求编码",width:"155px","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"sale_price",label:"销售单价(元)",width:"110","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"num",label:"购买数量",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"good_img",label:"商品图片","min-width":"242px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.good_img&&0<e.row.good_img.length?a("div",t._l(e.row.good_img,(function(t,e){return a("img",{directives:[{name:"viewer",rawName:"v-viewer"}],key:t+e,staticClass:"hover fl",staticStyle:{display:"inline-block",width:"20px",height:"20px",margin:"0 2px 0 0"},attrs:{src:t,alt:""}})})),0):t._e()]}}],null,!1,2040352965)}),a("el-table-column",{attrs:{prop:"good_name",label:"商品名称","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.good_name))]),t._l(e.row.specinfo,(function(e,n){return a("span",{key:e.id+n},[t._v(t._s(0===n?"_":"-")+t._s(e.spec_name)+"["+t._s(e.spec_value_name)+"]")])}))]}}],null,!1,3656961804)}),a("el-table-column",{attrs:{prop:"class_cat",label:"商品分类",width:"200px","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.cat_info,(function(e,n){return a("span",{key:e.id+n},[t._v(t._s(0===n?"":"_")+t._s(e.name))])}))}}],null,!1,3651140229)}),a("el-table-column",{attrs:{prop:"brand_name",label:"品牌",width:"100px","show-overflow-tooltip":""}})],1)],1):t._e()])])])])}),[],!1,null,"454cb079",null).exports},data:function(){return{currentRow:null,loading:!0,status:"",radio:"",sitem:{},queryId:"",multipleSelection:[],tableData:[],newTime:"",statusoptions:[{value:"1",label:"待商品反馈"},{value:"2",label:"待项目反馈商品选择"},{value:"3",label:"待项目方案制定"},{value:"4",label:"待方案选择"},{value:"5",label:"项目结束"}]}},mounted:function(){var t=this.$route.query.id;this.queryId=t,this.initData()},methods:{initData:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var a,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.next=3,s={projectNo:t.queryId,full:t.$route.path},c=void 0,c=(s=JSON.parse(JSON.stringify(s))).full,delete s.full,r({url:"".concat("/good-share"===c?l:i,"admin/projectshare"),method:"post",data:s});case 3:n=e.sent,o=n.code,a=n.message,n=n.data,t.loading=!1,0===o?(t.sitem=JSON.parse(JSON.stringify(n)),o=t.sitem.status,t.status=o,t.getNewTime()):t.$message.warning(a);case 9:case"end":return e.stop()}var s,c}),e)})))()},getNewTime:function(){this.newTime=(new Date).valueOf()}}},a("96c0"),m=Object(d.a)(p,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"good-share"},[e("div",{staticClass:"left"},[e("div",{staticClass:"title"},[t._v("项目信息")]),e("ul",{directives:[{name:"show",rawName:"v-show",value:t.sitem,expression:"sitem"}],staticClass:"clear"},[e("li",[e("div",{staticClass:"label"},[t._v("总预算:")]),e("div",{staticClass:"label-main"},[t._v(t._s(t.sitem.budget_total)+"元")])]),e("li",[e("div",{staticClass:"label"},[t._v("到货日期:")]),e("div",{staticClass:"label-main"},[t._v(t._s(t.sitem.arrtime))])]),e("li",[e("div",{staticClass:"label"},[t._v("业务员:")]),e("div",{staticClass:"label-main"},[t._v(t._s(t.sitem.creater))])]),e("li",[e("div",{staticClass:"label"},[t._v("购买方:")]),e("div",{staticClass:"label-main"},[t._v(t._s(t.sitem.company))])]),e("li",[e("div",{staticClass:"label"},[t._v("项目编号:")]),e("div",{staticClass:"label-main"},[t._v(t._s(t.sitem.projectNo))])]),e("li",[e("div",{staticClass:"label"},[t._v("项目名称:")]),e("div",{staticClass:"label-main"},[t._v(t._s(t.sitem.project_name))])]),e("li",[e("div",{staticClass:"label"},[t._v("项目用途:")]),e("div",{staticClass:"label-main"},[t._v(t._s(t.sitem.use_desc))])])])]),e("div",{staticClass:"right"},[""!==t.newTime&&"2"===t.status?e("change-back-good",{attrs:{newTime:t.newTime,sitem:t.sitem},on:{refresh:function(e){return t.initData()}}}):t._e(),""===t.newTime||"3"!==t.status&&"4"!==t.status&&"5"!==t.status?t._e():e("show-back-good",{attrs:{newTime:t.newTime,sitem:t.sitem},on:{refresh:function(e){return t.initData()}}})],1)])}),[],!1,null,"7d145cb8",null);e.default=m.exports},"38c8":function(t,e,a){},"4d1f":function(t,e,a){"use strict";a("5f3f")},"5f3f":function(t,e,a){},"96c0":function(t,e,a){"use strict";a("f992")},"99af":function(t,e,a){"use strict";var n=a("23e7"),o=a("d039"),r=a("e8b5"),i=a("861d"),l=a("7b0b"),s=a("50c4"),c=a("8418"),u=a("65f0"),p=a("1dde"),d=a("b622"),m=(a=a("2d00"),d("isConcatSpreadable")),f=9007199254740991,g="Maximum allowed index exceeded";d=51<=a||!o((function(){var t=[];return t[m]=!1,t.concat()[0]!==t})),a=p("concat");n({target:"Array",proto:!0,forced:!d||!a},{concat:function(t){for(var e,a,n,o=l(this),p=u(o,0),d=0,h=-1,w=arguments.length;h<w;h++)if(function(t){if(!i(t))return!1;var e=t[m];return void 0!==e?!!e:r(t)}(n=-1===h?o:arguments[h])){if(a=s(n.length),f<d+a)throw TypeError(g);for(e=0;e<a;e++,d++)e in n&&c(p,d,n[e])}else{if(f<=d)throw TypeError(g);c(p,d++,n)}return p.length=d,p}})},ad10:function(t,e,a){"use strict";a("38c8")},e9c4:function(t,e,a){function n(t,e,a){var n=a.charAt(e-1);a=a.charAt(e+1);return s.test(t)&&!c.test(a)||c.test(t)&&!s.test(n)?"\\u"+t.charCodeAt(0).toString(16):t}var o=a("23e7"),r=a("d066"),i=(a=a("d039"),r("JSON","stringify")),l=/[\uD800-\uDFFF]/g,s=/^[\uD800-\uDBFF]$/,c=/^[\uDC00-\uDFFF]$/;r=a((function(){return'"\\udf06\\ud834"'!==i("\udf06\ud834")||'"\\udead"'!==i("\udead")}));i&&o({target:"JSON",stat:!0,forced:r},{stringify:function(t,e,a){var o=i.apply(null,arguments);return"string"==typeof o?o.replace(l,n):o}})},f992:function(t,e,a){}}]);