yxk_pc_mdh/gyhl/static/js/32.ddc90b82a84d574d1418.js

1 line
48 KiB
JavaScript

webpackJsonp([32],{"+FEi":function(t,e,a){"use strict";var o=a("2QJe"),s=(a("TExn"),a("bzuE")),i={name:"",props:{printDetail:{type:Object,default:{}},printList:{type:Array,default:[]},printForm:{type:Array,default:[]},printTotal:{type:Object,default:{}},printDirection:{type:Number,default:1}},data:function(){return{pageHeight:"",pageWidth:"",config:s.a}},component:{},mounted:function(){0===this.printDirection?(this.pageHeight=this.config.printHeightDirection0,this.pageWidth=this.config.printWidthDirection0):1===this.printDirection?(this.pageHeight=this.config.printHeightDirection1,this.pageWidth=this.config.printWidthDirection1):2===this.printDirection&&(this.pageHeight=this.config.printHeightDirection2,this.pageWidth=this.config.printWidthDirection2)},watch:{printList:{handler:function(t,e){Object(o.a)(t,this.printForm,this.printTotal,this.printDirection)},deep:!0}}},r={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"print_content",style:{width:t.pageWidth+"px"}},[a("div",{staticClass:"print_top"},[a("div",{staticClass:"head_out"},[a("h1",{staticStyle:{"text-align":"center"}},[t._v("销售出库单")]),t._v(" "),t.printDetail?a("div",{staticClass:"head2"},[a("div",{staticClass:"head2_item"},[t._v("客户:"+t._s(t.printDetail.clientName))]),t._v(" "),a("div",{staticClass:"head2_item"},[t._v("出库日期:"+t._s(t.printDetail.outTime))]),t._v(" "),a("div",{staticClass:"head2_item"},[t._v("单据编号:"+t._s(t.printDetail.outCode))])]):t._e()]),t._v(" "),a("div",{staticClass:"table_content"})]),t._v(" "),a("div",{staticClass:"footer_out"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:5}},[a("div",[t._v("开票员:"+t._s(t.printDetail.createByName))])]),t._v(" "),a("el-col",{attrs:{span:6}},[a("div",[t._v("仓库保管员:")])]),t._v(" "),a("el-col",{attrs:{span:6}},[a("div",[t._v("收款:")])]),t._v(" "),a("el-col",{attrs:{span:5}},[a("div",[t._v("客户:")])])],1)],1)])},staticRenderFns:[]},l=a("VU/8")(i,r,!1,null,null,null);e.a=l.exports},"+k4o":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("CNbG"),s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"sys-box plan-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.back()}}},[t._v(t._s(t.config.cancelText))]),t._v(" "),179!=t.auditStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"sales:salesStock:save",expression:"'sales:salesStock:save'"}],attrs:{type:"primary",disabled:t.isDisabled},on:{click:function(e){return t.save("form")}}},[t._v("保存\n ")]):t._e(),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.clear()}}},[t._v("新增")]),t._v(" "),a("el-dropdown",{staticStyle:{"margin-left":"10px","margin-right":"10px"},on:{command:t.printNew}},[a("el-button",{attrs:{type:"primary"}},[t._v("\n 打印"),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.printTypeList,function(e,o){return a("el-dropdown-item",{key:o,attrs:{command:e}},[t._v(t._s(e.name)+"\n ")])}),1)],1),t._v(" "),t.btnDelDisabled&&178==t.auditStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"sales:salesStock:audit",expression:"'sales:salesStock:audit'"}],attrs:{type:"primary"},on:{click:t.audit}},[t._v("\n 审核\n ")]):t._e(),t._v(" "),t.btnDelDisabled&&179==t.auditStatus?a("el-button",{directives:[{name:"has",rawName:"v-has",value:"sales:salesStock:disAudit",expression:"'sales:salesStock:disAudit'"}],attrs:{type:"primary"},on:{click:t.disAudit}},[t._v("反审核\n ")]):t._e()],1),t._v(" "),a("div",{staticClass:"sys-form"},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"form",attrs:{"label-width":"120px","inline-message":!0,model:t.formData,rules:t.ruleForm}},[a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"客户名称",prop:"clientName"}},[a("btn-input",{attrs:{valueText:t.formData.clientName,valueId:t.formData.clientId,chooseVisible:t.chooseClientrVisible,showBtn:179!=t.auditStatus&&t.model.childList.length<=0},on:{"update:valueText":function(e){return t.$set(t.formData,"clientName",e)},"update:value-text":function(e){return t.$set(t.formData,"clientName",e)},"update:valueId":function(e){return t.$set(t.formData,"clientId",e)},"update:value-id":function(e){return t.$set(t.formData,"clientId",e)},"update:chooseVisible":function(e){t.chooseClientrVisible=e},"update:choose-visible":function(e){t.chooseClientrVisible=e}}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"销售员",prop:"salesUserName"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formData.salesUserName,callback:function(e){t.$set(t.formData,"salesUserName",e)},expression:"formData.salesUserName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"销售部门",prop:"deptName"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formData.deptName,callback:function(e){t.$set(t.formData,"deptName",e)},expression:"formData.deptName"}})],1)],1),t._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"项目信息"}},[a("el-input",{attrs:{readonly:""},model:{value:t.formData.projectName,callback:function(e){t.$set(t.formData,"projectName",e)},expression:"formData.projectName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"联系人"}},[a("el-input",{attrs:{disabled:179==t.auditStatus},model:{value:t.formData.linkName,callback:function(e){t.$set(t.formData,"linkName",e)},expression:"formData.linkName"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"联系电话"}},[a("el-input",{attrs:{disabled:179==t.auditStatus},model:{value:t.formData.linkPhone,callback:function(e){t.$set(t.formData,"linkPhone",e)},expression:"formData.linkPhone"}})],1)],1),t._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"收货地址"}},[a("el-input",{attrs:{disabled:179==t.auditStatus},model:{value:t.formData.harvestAddress,callback:function(e){t.$set(t.formData,"harvestAddress",e)},expression:"formData.harvestAddress"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"运输方式"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.formData.transportWay,callback:function(e){t.$set(t.formData,"transportWay",e)},expression:"formData.transportWay"}},t._l(t.transportoptions,function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"物流单号"}},[a("el-input",{attrs:{disabled:179==t.auditStatus},model:{value:t.formData.trackingNumber,callback:function(e){t.$set(t.formData,"trackingNumber",e)},expression:"formData.trackingNumber"}})],1)],1),t._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"物流公司"}},[a("el-input",{attrs:{disabled:179==t.auditStatus},model:{value:t.formData.logisticsCompany,callback:function(e){t.$set(t.formData,"logisticsCompany",e)},expression:"formData.logisticsCompany"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"运输费用"}},[a("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0,label:"描述文字",size:"small",disabled:179==t.auditStatus},model:{value:t.formData.transportCosts,callback:function(e){t.$set(t.formData,"transportCosts",e)},expression:"formData.transportCosts"}})],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"出库时间",prop:"outTime"}},[a("el-date-picker",{attrs:{type:"date",format:"yyyy-MM-dd","range-separator":"—",placeholder:"选择日期","value-format":"yyyy-MM-dd",clearable:"",disabled:179==t.auditStatus},model:{value:t.formData.outTime,callback:function(e){t.$set(t.formData,"outTime",e)},expression:"formData.outTime"}})],1)],1),t._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{staticClass:"form-inline",attrs:{label:"销售方式"}},[a("el-radio-group",{model:{value:t.formData.salesType,callback:function(e){t.$set(t.formData,"salesType",e)},expression:"formData.salesType"}},[a("el-radio",{attrs:{disabled:!!t.salesOutStockId||t.model.childList.length>0,label:1}},[t._v("赊销")]),t._v(" "),a("el-radio",{attrs:{disabled:!!t.salesOutStockId||t.model.childList.length>0,label:0}},[t._v("现销")])],1)],1),t._v(" "),a("el-form-item",{staticClass:"form-inline",attrs:{label:"出库员",prop:"operatorName"}},[a("btn-input",{attrs:{valueText:t.formData.operatorName,valueId:t.formData.operator,chooseVisible:t.chooseOperatorVisible,showBtn:179!=t.auditStatus},on:{"update:valueText":function(e){return t.$set(t.formData,"operatorName",e)},"update:value-text":function(e){return t.$set(t.formData,"operatorName",e)},"update:valueId":function(e){return t.$set(t.formData,"operator",e)},"update:value-id":function(e){return t.$set(t.formData,"operator",e)},"update:chooseVisible":function(e){t.chooseOperatorVisible=e},"update:choose-visible":function(e){t.chooseOperatorVisible=e}}})],1)],1)]),t._v(" "),a("el-divider",{attrs:{"content-position":"left"}},[1==t.formData.salesType?a("div",[t._v("关联单据")]):t._e(),t._v(" "),0==t.formData.salesType?a("div",[t._v("物料选择")]):t._e()]),t._v(" "),a("el-form",{ref:"formChild",attrs:{rules:t.model.rules,model:t.model}},[a("el-form-item",{staticClass:"childlist",attrs:{prop:"childList"}},[a("div",{staticClass:"sys-operate",staticStyle:{"margin-bottom":"10px"}},[0==t.formData.salesType&&179!=t.auditStatus?a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.ChooseMaterielVisible=!0}}},[t._v("添加物料")]):t._e(),t._v(" "),1==t.formData.salesType&&179!=t.auditStatus?a("el-button",{attrs:{type:"primary"},on:{click:t.ChooseImportShow}},[t._v("导入关联单据")]):t._e(),t._v(" "),179!=t.auditStatus?a("el-button",{attrs:{type:"primary",disabled:t.btnDelDisabled},on:{click:function(e){return t.removePart()}}},[t._v("删除")]):t._e(),t._v(" "),179!=t.auditStatus?a("el-button",{attrs:{type:"primary",disabled:t.btnOtherDisabled},on:{click:t.copy}},[t._v("复制行")]):t._e()],1),t._v(" "),a("el-table",{attrs:{data:t.model.childList,"show-summary":"","summary-method":t.getSummaries,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"},border:""},on:{"selection-change":t.handlePartChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"库存查询"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return a.stopPropagation(),t.openDetails(e)}}},[t._v(t._s(e.row.btnName))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"materielSerialNo",label:"物料代码",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"materielName",label:"物料名称",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"specification",align:"center","show-overflow-tooltip":"",label:"规格型号"}}),t._v(" "),a("el-table-column",{attrs:{prop:"unitUomName",align:"center",label:"主计量单位","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"count",align:"center",label:"主单位数量","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"supportUomName",align:"center",label:"辅助单位","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"convCoefficient",align:"center",label:"换算系数"}}),t._v(" "),a("el-table-column",{attrs:{prop:"subQuoteCount",align:"center",width:"180",label:"出库数量","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form-item",{class:e.row.error_count?"error_count":"",attrs:{prop:"childList."+e.$index+".count",rules:t.model.rules.count}},[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small",precision:e.row.quantityAccuracy,"controls-position":"right",disabled:179==t.auditStatus},on:{change:function(a){return t.changeCount2(e.row)}},model:{value:e.row.subQuoteCount,callback:function(a){t.$set(e.row,"subQuoteCount",a)},expression:"scope.row.subQuoteCount"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"facName",width:"120",align:"center",label:"仓库","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"locationName",width:"120",align:"center",label:"仓位","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"batch",width:"120",align:"center",label:"批号","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"sellUnitPrice",align:"center",width:"180",label:"销售单价(元)","label-class-name":"required_head"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form-item",{attrs:{prop:"childList."+e.$index+".taxUnitPrice",rules:t.model.rules.taxUnitPrice}},[a("el-input-number",{staticClass:"inputClass",staticStyle:{width:"100%"},attrs:{min:0,size:"small",precision:e.row.priceAccuracy,"controls-position":"right",disabled:179==t.auditStatus},model:{value:e.row.sellUnitPrice,callback:function(a){t.$set(e.row,"sellUnitPrice",a)},expression:"scope.row.sellUnitPrice"}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",width:"140",label:"销售金额(元)",prop:"sellAmount"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.sum1(e.row.subQuoteCount,e.row.sellUnitPrice,e.$index))+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"单价(元)",width:"140",prop:"unitPrice"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",width:"140",label:"金额成本(元)",prop:"amount"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.sum2(e.row.subQuoteCount,e.row.unitPrice,e.$index,e.row.priceAccuracy))+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"remarks",width:"220",align:"center",label:"备注"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autosize:{minRows:1},clearable:"",disabled:179==t.auditStatus},model:{value:e.row.remarks,callback:function(a){t.$set(e.row,"remarks",a)},expression:"scope.row.remarks"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"thisSourceTypeName",align:"center",label:"源单类型",width:"120px"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.thisSourceTypeName?a("div",[t._v(t._s(e.row.thisSourceTypeName))]):a("div")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"deliveryCode","show-overflow-tooltipalign":"",label:"源单单号"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticStyle:{color:"#3a8ee6"},on:{click:function(a){return t.goToLink(e.queryId)}}},[t._v(t._s(e.row.deliveryCode))])]}}])})],1)],1),t._v(" "),a("el-form-item",{staticClass:"remarkstyle",attrs:{label:"附件","label-width":"50px"}},[t.advanceQueryDialogVisible?a("upload",{attrs:{title:"",label_width:"0",attachment:t.uploadAttachment},on:{"update:attachment":function(e){t.uploadAttachment=e}}}):t._e()],1),t._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"remarks"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4},placeholder:"请简要填写备注内容",disabled:179==t.auditStatus},model:{value:t.formData.remarks,callback:function(e){t.$set(t.formData,"remarks",e)},expression:"formData.remarks"}})],1)],1),t._v(" "),t.salesOutStockId?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:5}},[t._v("制单人:"+t._s(t.formData.createUserName))]),t._v(" "),a("el-col",{attrs:{span:7}},[t._v("制单时间:"+t._s(t.formData.createTime))]),t._v(" "),a("el-col",{attrs:{span:5}},[t._v("审核人:"+t._s(t.formData.auditorName))]),t._v(" "),a("el-col",{attrs:{span:7}},[t._v("审核时间:"+t._s(t.formData.auditTime))])],1):t._e()],1),t._v(" "),a("DialogChooseSingleClientr",{attrs:{visible:t.chooseClientrVisible,dataForm:t.formData},on:{"update:visible":function(e){t.chooseClientrVisible=e},change:t.getClientr}}),t._v(" "),a("DialogChooseSingleUser",{attrs:{visible:t.chooseUserVisible},on:{"update:visible":function(e){t.chooseUserVisible=e},change:t.getUser}}),t._v(" "),a("DialogChooseSingleUser",{attrs:{visible:t.chooseOperatorVisible},on:{"update:visible":function(e){t.chooseOperatorVisible=e},change:t.getOperator}}),t._v(" "),a("dialogChooseContract",{attrs:{visible:t.ChooseSalesOutStockVisible,clientName:t.formData.clientName,clientId:t.formData.clientId},on:{"update:visible":function(e){t.ChooseSalesOutStockVisible=e},change:t.getSalesOutStock}}),t._v(" "),a("dialogChooseSingleStock",{attrs:{visible:t.ChooseStockVisible,materielId:t.materielId,supportUom:t.supportUom},on:{"update:visible":function(e){t.ChooseStockVisible=e},change:t.getStock}}),t._v(" "),a("dialogChooseParts",{attrs:{visible:t.ChooseMaterielVisible},on:{"update:visible":function(e){t.ChooseMaterielVisible=e},change:t.getMateriel}}),t._v(" "),a("dialogChooseSingleProject",{attrs:{visible:t.chooseProjectVisible},on:{"update:visible":function(e){t.chooseProjectVisible=e},change:t.getProject}}),t._v(" "),a("div",{staticStyle:{margin:"0 auto",display:"none"},attrs:{id:"print_content"}},[a("printStock",{attrs:{printDetail:t.printDetail,printList:t.printList,printForm:t.printForm,printTotal:t.printTotal,printDirection:t.printDirection}})],1)],1)},staticRenderFns:[]};var i=function(t){a("2+NV"),a("e4t6")},r=a("VU/8")(o.a,s,!1,i,"data-v-7fb0fc12",null);e.default=r.exports},"2+NV":function(t,e){},Atu7:function(t,e,a){"use strict";var o=a("bzuE"),s=a("e99b"),i={props:{id:{type:String,default:""},clientId:"",clientName:"",visible:{type:Boolean,default:!1}},watch:{visible:function(t,e){t!==e&&(t&&this.initData(),this.innerVisible=t,this.$nextTick(function(){this.$refs.tb.clearSelection()}))},innerVisible:function(t,e){t!==e&&this.$emit("update:visible",t)},time:function(t){t?(this.searchData_Subset.startTime=t[0],this.searchData_Subset.endTime=t[1]):(this.searchData_Subset.startTime="",this.searchData_Subset.endTime="")}},data:function(){return{subsetList:[],subsetAll:[],subsetTotal:0,searchData_Subset:{page:1,pageSize:5,auditSign:179},sourceTypeId:"发货通知",time:"",contractDate:"",callBackData:[],innerVisible:this.visible,loading:!1,dialogLoading:!1,deviceType:[{value:521,label:"发货通知"}],value:"thisSourceTypeName",deviceDept:[],addVisible:!1,config:o.a}},computed:{},methods:{getRowKey:function(t){return t.id+"_"+t.materielId},clickRow:function(t){this.$refs.tb.toggleRowSelection(t)},initData:function(){this.searchSubset()},searchSubset:function(){var t=this;this.clientId&&(this.searchData_Subset.clientId=this.clientId,this.searchData_Subset.clientName=this.clientName),this.dialogLoading=!0,this.time?(this.searchData_Subset.startTime=this.time[0],this.searchData_Subset.endTime=this.time[1]):(this.searchData_Subset.startTime="",this.searchData_Subset.endTime=""),s.a.findDialog(this.searchData_Subset).then(function(e){t.dialogLoading=!1,0===e.code&&(t.subsetList=e.data?e.data.datas:[],t.subsetTotal=e.data?e.data.totalRows:0)})},ckSubsetAll:function(t){this.subsetAll=t},subsetSizeChange:function(t){this.searchData_Subset.pageSize=t,this.searchSubset()},subsetCurrentChange:function(t){this.searchData_Subset.page=t,this.searchSubset()},submit:function(t){var e=[];this.subsetAll.length>0&&this.subsetAll.forEach(function(t){e.push(t)}),this.$emit("change",e),this.innerVisible=!1},resetFields:function(){this.$refs.form&&this.$refs.form.resetFields()}}},r={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],attrs:{center:"",title:"选择发货通知关联数据",visible:t.innerVisible,width:"1000px"},on:{"update:visible":function(e){t.innerVisible=e}}},[a("div",[a("el-form",{attrs:{inline:""}},[a("el-form-item",{attrs:{label:"源单类型"}},[a("el-select",{attrs:{size:"small",value:""},model:{value:t.sourceTypeId,callback:function(e){t.sourceTypeId=e},expression:"sourceTypeId"}},t._l(t.deviceType,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1),t._v(" "),a("div",{staticClass:"flex"},[a("el-form-item",{attrs:{label:"客户"}},[a("el-input",{attrs:{placeholder:"请输入客户名称",clearable:"",size:"small"},model:{value:t.searchData_Subset.clientName,callback:function(e){t.$set(t.searchData_Subset,"clientName",e)},expression:"searchData_Subset.clientName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"通知日期"}},[a("el-date-picker",{attrs:{type:"datetimerange",format:"yyyy-MM-dd HH:mm:ss","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:t.time,callback:function(e){t.time=e},expression:"time"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.searchSubset()}}},[t._v("查询")])],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"sys-table"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.dialogLoading,expression:"dialogLoading"}],ref:"tb",attrs:{"row-key":t.getRowKey,data:t.subsetList,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"row-click":t.clickRow,"selection-change":t.ckSubsetAll}},[a("el-table-column",{attrs:{type:"selection","reserve-selection":!0,width:"55",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{prop:"deliveryCode",label:"发货通知编号",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"noteTime",label:"通知日期",align:"center","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.noteTime.substring(0,10)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"clientName",label:"客户名称",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"materielSerialNo",label:"物料代码",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"materielName",label:"物料名称",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"specification",label:"规格型号",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"unitUomName",label:"主计量单位",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"deliveryCount",label:"发货数量(主单位)",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"quoteCount",label:"可执行数量(主单位)",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"supportUomName",label:"辅助单位",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"deliveryCountSupport",label:"发货数量(辅助单位)",align:"center","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{prop:"subQuoteCount",label:"可执行数量(辅助单位)",align:"center","show-overflow-tooltip":""}})],1)],1),t._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":t.searchData_Subset.page,"page-sizes":[5,10,20],"page-size":t.searchData_Subset.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.subsetTotal},on:{"update:currentPage":function(e){return t.$set(t.searchData_Subset,"page",e)},"update:current-page":function(e){return t.$set(t.searchData_Subset,"page",e)},"size-change":t.subsetSizeChange,"current-change":t.subsetCurrentChange}})],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary",size:"small",loading:t.loading},on:{click:function(e){return t.submit()}}},[t._v("确定")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){t.innerVisible=!1}}},[t._v(t._s(t.config.cancelText))])],1)])},staticRenderFns:[]},l=a("VU/8")(i,r,!1,null,null,null);e.a=l.exports},CNbG:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify__=__webpack_require__("mvHQ"),__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify__),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_slicedToArray__=__webpack_require__("d7EF"),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_slicedToArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_slicedToArray__),__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_promise__=__webpack_require__("//Fk"),__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_promise___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_promise__),__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends__=__webpack_require__("Dd8w"),__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends__),__WEBPACK_IMPORTED_MODULE_4__sales_sales_stock_printStock_vue__=__webpack_require__("+FEi"),__WEBPACK_IMPORTED_MODULE_5__components_btnInput_vue__=__webpack_require__("ysqt"),__WEBPACK_IMPORTED_MODULE_6_js_cookie__=__webpack_require__("lbHh"),__WEBPACK_IMPORTED_MODULE_6_js_cookie___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_js_cookie__),__WEBPACK_IMPORTED_MODULE_7_vuex__=__webpack_require__("NYxO"),__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseSingleClient__=__webpack_require__("iGlD"),__WEBPACK_IMPORTED_MODULE_9__components_System_dialogChooseSingleUser__=__webpack_require__("3MlD"),__WEBPACK_IMPORTED_MODULE_10__components_Dialog_dialogChooseContract__=__webpack_require__("Atu7"),__WEBPACK_IMPORTED_MODULE_11__components_Dialog_dialogChooseSingleStock__=__webpack_require__("rfXi"),__WEBPACK_IMPORTED_MODULE_12__components_Dialog_dialogChooseSingleProject__=__webpack_require__("EbRb"),__WEBPACK_IMPORTED_MODULE_13__components_System_dialogChooseParts_vue__=__webpack_require__("CdUU"),__WEBPACK_IMPORTED_MODULE_14__utils_config_js__=__webpack_require__("bzuE"),__WEBPACK_IMPORTED_MODULE_15__utils_tools__=__webpack_require__("GKmE"),__WEBPACK_IMPORTED_MODULE_16__components_System_upload__=__webpack_require__("veZ4");__webpack_exports__.a={inject:["reload"],components:{DialogChooseSingleClientr:__WEBPACK_IMPORTED_MODULE_8__components_System_dialogChooseSingleClient__.a,DialogChooseSingleUser:__WEBPACK_IMPORTED_MODULE_9__components_System_dialogChooseSingleUser__.a,btnInput:__WEBPACK_IMPORTED_MODULE_5__components_btnInput_vue__.a,printStock:__WEBPACK_IMPORTED_MODULE_4__sales_sales_stock_printStock_vue__.a,dialogChooseContract:__WEBPACK_IMPORTED_MODULE_10__components_Dialog_dialogChooseContract__.a,dialogChooseSingleStock:__WEBPACK_IMPORTED_MODULE_11__components_Dialog_dialogChooseSingleStock__.a,dialogChooseParts:__WEBPACK_IMPORTED_MODULE_13__components_System_dialogChooseParts_vue__.a,dialogChooseSingleProject:__WEBPACK_IMPORTED_MODULE_12__components_Dialog_dialogChooseSingleProject__.a,upload:__WEBPACK_IMPORTED_MODULE_16__components_System_upload__.a},data:function(){return{printDirection:1,printTypeList:[],formData:{operatorName:"",operator:"",outTime:"",clientName:"",clientId:"",salesUserName:"",salesUser:"",deptName:"",deptId:"",salesType:"",projectId:"",projectName:"",transportCosts:0},auditStatus:"",config:__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a,userInfo:{},transportoptions:[],itemIds:[],salesOutStockId:"",availableCount:0,totalCount:0,model:{rules:{count:{required:!0,message:"出库数量必填",trigger:"change"},sellUnitPrice:{required:!0,message:"销售单价必填",trigger:"change"}},childList:[]},chooseProjectVisible:!1,btnOtherDisabled:!0,uploadAttachment:[],contentAssocList:[],advanceQueryDialogVisible:!0,btnDelDisabled:!1,chooseOperatorVisible:!1,ChooseMaterielVisible:!1,chooseClientrVisible:!1,ChooseStockVisible:!1,ChooseSalesOutStockVisible:!1,chooseUserVisible:!1,loading:!1,isDisabled:!1,materielId:"",supportUom:"",currentIndex:"",ruleForm:{clientName:[{required:!0,message:"请选择客户",trigger:"change"}],salesUserName:[{required:!0,message:"请选择销售员",trigger:"change"}],deptName:[{required:!0,message:"请选择销售部门",trigger:"change"}],outTime:[{required:!0,message:"请选择出库时间",trigger:"change"}],operatorName:[{required:!0,message:"请选择出库员",trigger:"change"}]},printTotal:{count:"",subQuoteCount:""},printList:[],printDetail:{clientName:"",outTime:"",outCode:""},printForm:[{title:"物料代码",prop_:"serialno"},{title:"物料名称",prop_:"productName"},{title:"规格型号",prop_:"model"},{title:"单位",prop_:"unitUomName"},{title:"辅助单位",prop_:"supportUomName"},{title:"批号",prop_:"batch"},{title:"出库数量",prop_:"count"},{title:"出库数量(辅助单位)",prop_:"subQuoteCount"},{title:"销售单价",prop_:"sellUnitPrice"},{title:"销售金额",prop_:"sellAmount"},{title:"仓库",prop_:"facName"},{title:"库位",prop_:"locationName"}]}},mounted:function(){if(this.userInfo=JSON.parse(__WEBPACK_IMPORTED_MODULE_6_js_cookie___default.a.get("userInfo")),this.initData(),this.formData.salesType=1,this.$route.query.id)this.formData.id=this.$route.query.id,this.salesOutStockId=this.$route.query.id,this.getDetail();else{var t=new Date;this.$set(this.formData,"outTime",t.getFullYear()+"-"+this.settime(t.getMonth()+1)+"-"+this.settime(t.getDate()))}this.$route.query.dataForm&&(this.formData=JSON.parse(this.$route.query.dataForm))},watch:{salesOutStockId:{handler:function(t,e){this.btnDelDisabled=""!=t&&void 0!=t}},salesType:function(t){0!=val.salesType&&1!=val.salesType||(this.model.childList=[],this.itemIds=[])},formData:{handler:function(t,e){""==t.clientId&&(this.formData.salesUser="",this.formData.salesUserName="",this.formData.deptName="",this.formData.deptId=""),""==t.salesUser&&(this.formData.deptName="",this.formData.deptId="")},deep:!0}},methods:__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({},Object(__WEBPACK_IMPORTED_MODULE_7_vuex__.d)({removeTagNav:"tagNav/removeTagNav"}),{initData:function(){var t=this;__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_promise___default.a.all([this.$api.processAPI.processTypeList({type:"transport_way"}),this.$api.dictAPI.getDictsByType("print_type")].map(function(t){return t.catch(function(t){return t})})).then(function(e){var a=__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_slicedToArray___default()(e,2),o=a[0],s=a[1];t.transportoptions=o.datas,0===s.code&&(t.printTypeList=s.datas)}).catch(function(t){console.log(t)})},getProject:function(t){console.log(t),t?(this.formData.projectId=t.id,this.formData.projectName=t.name):(this.formData.projectId="",this.formData.projectName="")},changeCount:function(t){if(t.error_count){for(var e=0,a=0;a<this.model.childList.length;a++)t.error_count&&t.sourceId==this.model.childList[a].sourceId&&(e=parseFloat(e)+parseFloat(this.model.childList[a].count));parseFloat(t.sourceCount)>=e&&this.model.childList.forEach(function(e){e.sourceId==t.sourceId&&delete e.error_count})}},settime:function(t){return 1==t.toString().length?"0"+t.toString():t},getDetail:function(){var t=this,e=this;this.loading=!0,this.$nextTick().then(function(){t.$api.saleStockAPI.getDetail({id:t.formData.id}).then(function(a){if(t.loading=!1,e.$set(e.formData,"auditStatus",a.stockOut.auditSign?a.stockOut.auditSign:""),e.auditStatus=t.formData.auditStatus,e.$set(e.formData,"clientName",a.stockOut.clientName?a.stockOut.clientName:""),e.$set(e.formData,"clientId",a.stockOut.clientId?a.stockOut.clientId:""),e.$set(e.formData,"salesUserName",a.stockOut.salesUserName?a.stockOut.salesUserName:""),e.$set(e.formData,"salesUser",a.stockOut.salesUser?a.stockOut.salesUser:""),e.$set(e.formData,"deptName",a.stockOut.deptName?a.stockOut.deptName:""),e.$set(e.formData,"deptId",a.stockOut.deptId?a.stockOut.deptId:""),e.$set(e.formData,"salesType",a.stockOut.salesType?a.stockOut.salesType:0),e.$set(e.formData,"operatorName",a.stockOut.operatorName?a.stockOut.operatorName:""),e.$set(e.formData,"operator",a.stockOut.operator?a.stockOut.operator:""),e.$set(e.formData,"outTime",a.stockOut.outTime?a.stockOut.outTime:""),e.$set(e.formData,"remarks",a.stockOut.remarks?a.stockOut.remarks:""),e.$set(e.formData,"thisSourceTypeName",a.stockOut.sourceTypeName?a.stockOut.sourceTypeName:""),e.$set(e.formData,"code",a.stockOut.sourceCode?a.stockOut.sourceCode:""),e.$set(e.formData,"projectId",a.stockOut.projectId?a.stockOut.projectId:""),e.$set(e.formData,"projectName",a.stockOut.projectName?a.stockOut.projectName:""),e.$set(e.formData,"linkName",a.stockOut.linkName?a.stockOut.linkName:""),e.$set(e.formData,"linkPhone",a.stockOut.linkPhone?a.stockOut.linkPhone:""),e.$set(e.formData,"harvestAddress",a.stockOut.harvestAddress?a.stockOut.harvestAddress:""),e.$set(e.formData,"trackingNumber",a.stockOut.trackingNumber?a.stockOut.trackingNumber:""),e.$set(e.formData,"logisticsCompany",a.stockOut.logisticsCompany?a.stockOut.logisticsCompany:""),e.$set(e.formData,"transportCosts",a.stockOut.transportCosts?a.stockOut.transportCosts:""),e.$set(e.formData,"transportWay",a.stockOut.transportWay?a.stockOut.transportWay:""),e.$set(e.formData,"createUserName",a.stockOut.createUserName?a.stockOut.createUserName:""),e.$set(e.formData,"createTime",a.stockOut.createTime?a.stockOut.createTime:""),e.$set(e.formData,"auditTime",a.stockOut.auditTime?a.stockOut.auditTime:""),e.$set(e.formData,"auditorName",a.stockOut.auditorName?a.stockOut.auditorName:""),e.model.childList=a.stockOutItem,a.uploadAttachment&&a.uploadAttachment.length>0){t.fileDocList=[];for(var o=0;o<a.uploadAttachment.length;o++){var s={fileName:a.uploadAttachment[o].fileName,filePath:a.uploadAttachment[o].filePath};t.uploadAttachment.push(s)}}e.model.childList.forEach(function(e){t.$set(e,"btnName","已查询"),t.$set(e,"onlyId",e.materielId+"_"+Math.random()),e.serialno=e.materielSerialNo?e.materielSerialNo:"",e.productName=e.materielName?e.materielName:"",e.model=e.specification?e.specification:"",e.unitName=e.unitUomName?e.unitUomName:"",e.sellUnitPrice=e.sellUnitPrice?e.sellUnitPrice:0,e.unitPrice=e.unitPrice?e.unitPrice:0,e.sellAmount=e.sellAmount?e.sellAmount:0,e.facilityName=e.facName?e.facName:"",e.facilityLocationName=e.locationName?e.locationName:"",e.materielId=e.materielId?e.materielId:"",e.newId=e.id?e.id:"",e.stockId=e.stockId?e.stockId:"",e.thisSourceTypeName=e.sourceTypeName?e.sourceTypeName:"",e.deliveryCode=e.sourceCode?e.sourceCode:"",e.sourceId=e.sourceId?e.sourceId:"",e.sourceType=e.sourceType?e.sourceType:""}),t.printDetail.clientName=a.stockOut.clientName,t.printDetail.outTime=/\d{4}-\d{1,2}-\d{1,2}/g.exec(a.stockOut.outTime)[0],t.printDetail.outCode=a.stockOut.outCode,t.printDetail.createByName=t.formData.createUserName,t.printDetail.createTimePrint=Object(__WEBPACK_IMPORTED_MODULE_15__utils_tools__.i)(t.formData.createTime,"{y}-{m}-{d}"),t.printDetail.auditorName=t.formData.auditorName,t.printDetail.auditTimePrint=t.formData.auditTime?Object(__WEBPACK_IMPORTED_MODULE_15__utils_tools__.i)(t.formData.auditTime,"{y}-{m}-{d}"):"",t.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(t.model.childList))})})},clear:function(){this.$route.query.id&&(this.formData.id=void 0,this.salesOutStockId=void 0),this.contentAssocList=[],this.uploadAttachment=[],this.advanceQueryDialogVisible=!0,this.auditStatus="",this.model.childList=[],this.formData={},this.itemIds=[],this.$refs.form.resetFields(),this.formData.salesType=1;var t=new Date;this.$set(this.formData,"outTime",t.getFullYear()+"-"+this.settime(t.getMonth()+1)+"-"+this.settime(t.getDate()))},back:function(){this.removeTagNav({path:this.$route.path,title:this.$route.meta.name}),this.$router.push({path:"/sales/salesStock",query:{t:Date.now()}}),this.clear()},save:function(t){var e=this,a=void 0;this.$refs.formChild.validate(function(t,e){a=t}),this.$refs[t].validate(function(t){if(t){if(null!=e.uploadAttachment&&e.uploadAttachment.length>0){var o=[];e.uploadAttachment.forEach(function(t){var e={fileName:t.fileName,filePath:t.filePath};o.push(e)}),e.contentAssocList=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(o)}if(0==e.model.childList.length)return void e.$message({message:"请选择关联单据",type:"warning"});if(!a)return void e.$message({message:"有必填项未填写",type:"warning"});var s=!0;if(e.model.childList.forEach(function(t){t.subQuoteCount<=0&&(s=!1)}),!s)return void e.$message({message:"出库数量必须大于0",type:"warning"});var i=!0;if(e.model.childList.forEach(function(t){t.stockId||(i=!1)}),i)if(e.formData.id){var r=[];if(e.model.childList.forEach(function(t){console.log(t);var a={id:t.newId,stockId:t.stockId,materielId:t.materielId,count:t.count.toFixed(t.quantityAccuracy),supportUom:t.supportUom,convCoefficient:t.convCoefficient,outCount:t.subQuoteCount?t.subQuoteCount.toFixed(t.quantityAccuracy):0,unitPrice:t.unitPrice,sellUnitPrice:t.sellUnitPrice.toFixed(t.priceAccuracy),amount:t.amount?t.amount:0,sellAmount:t.sellAmount,sourceId:t.thisSourceId,sourceType:t.thisSourceType,sourceCode:t.deliveryCode,remarks:t.remarks?t.remarks:""};t.batch&&""!=t.batch&&(a.batch=t.batch),r.push(a),e.formData.item=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(r)}),e.isDisabled)return;e.isDisabled=!0,e.$api.saleStockAPI.editSalesStock({id:e.formData.id,clientId:e.formData.clientId,salesUser:e.formData.salesUser,deptId:e.formData.deptId,salesType:e.formData.salesType,outTime:e.formData.outTime,operator:e.formData.operator,remarks:e.formData.remarks,item:e.formData.item,itemIds:e.itemIds,projectId:e.formData.projectId?e.formData.projectId:"",linkName:e.formData.linkName?e.formData.linkName:"",linkPhone:e.formData.linkPhone?e.formData.linkPhone:"",harvestAddress:e.formData.harvestAddress?e.formData.harvestAddress:"",transportWay:e.formData.transportWay?e.formData.transportWay:"",transportCosts:e.formData.transportCosts?e.formData.transportCosts:0,logisticsCompany:e.formData.logisticsCompany?e.formData.logisticsCompany:"",trackingNumber:e.formData.trackingNumber?e.formData.trackingNumber:"",uploadAttachment:e.contentAssocList}).then(function(t){e.isDisabled=!1,0===t.code?e.$message({message:t.msg,type:"success"}):500===t.code&&t.data?(e.$message({message:t.msg,type:"error"}),e.model.childList.forEach(function(a){a.sourceId&&a.sourceId==t.data.sourceId&&(e.$set(a,"error_count",!0),e.$set(a,"sourceCount",t.data.sourceCount))})):e.$message({message:t.msg,type:"error"})})}else{var l=[];if(e.model.childList.forEach(function(t){console.log(t);var a={stockId:t.stockId,materielId:t.materielId,count:t.count.toFixed(t.quantityAccuracy),supportUom:t.supportUom,convCoefficient:t.convCoefficient,outCount:t.subQuoteCount?t.subQuoteCount.toFixed(t.quantityAccuracy):0,unitPrice:t.unitPrice,sellUnitPrice:t.sellUnitPrice.toFixed(t.priceAccuracy),amount:t.amount?t.amount:0,sellAmount:t.sellAmount,sourceId:t.thisSourceId,sourceType:t.thisSourceType,sourceCode:t.deliveryCode,remarks:t.remarks?t.remarks:""};t.batch&&""!=t.batch&&(a.batch=t.batch),l.push(a),e.formData.item=__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(l)}),e.isDisabled)return;e.isDisabled=!0,e.$api.saleStockAPI.addSalesStock({clientId:e.formData.clientId,salesUser:e.formData.salesUser,deptId:e.formData.deptId,salesType:e.formData.salesType,outTime:e.formData.outTime,operator:e.formData.operator,remarks:e.formData.remarks,item:e.formData.item,projectId:e.formData.projectId?e.formData.projectId:"",linkName:e.formData.linkName?e.formData.linkName:"",linkPhone:e.formData.linkPhone?e.formData.linkPhone:"",harvestAddress:e.formData.harvestAddress?e.formData.harvestAddress:"",transportWay:e.formData.transportWay?e.formData.transportWay:"",transportCosts:e.formData.transportCosts?e.formData.transportCosts:0,logisticsCompany:e.formData.logisticsCompany?e.formData.logisticsCompany:"",trackingNumber:e.formData.trackingNumber?e.formData.trackingNumber:"",uploadAttachment:e.contentAssocList}).then(function(t){e.isDisabled=!1,0===t.code?(e.$message({message:t.msg,type:"success"}),e.salesOutStockId=t.id,window.location.href=e.changeURLArg("id",t.id)):500===t.code&&t.data?(e.$message({message:t.msg,type:"error"}),e.model.childList.forEach(function(a){console.log(a),a.sourceId&&a.sourceId==t.data.sourceId&&(e.$set(a,"error_count",!0),e.$set(a,"sourceCount",t.data.sourceCount))})):e.$message({message:t.msg,type:"error"})})}else e.$message({message:"请查询库存",type:"error"})}})},changeURLArg:function changeURLArg(arg,arg_val){var url=window.location.href,pattern=arg+"=([^&]*)",replaceText=arg+"="+arg_val;if(url.match(pattern)){var tmp="/("+arg+"=)([^&]*)/gi";return tmp=url.replace(eval(tmp),replaceText),tmp}return url.match("[?]")?url+"&"+replaceText:url+"?"+replaceText},sum1:function(t,e,a){var o=t*e?t*e:0;return this.sellAmount=o,o=o.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo),this.$set(this.model.childList[a],"sellAmount",o),o},sum2:function(t,e,a,o){var s=t*e?t*e:0;return this.sellAmount=s,s=s.toFixed(__WEBPACK_IMPORTED_MODULE_14__utils_config_js__.a.amountFixedTo),this.$set(this.model.childList[a],"amount",s),s},audit:function(){var t=this,e=this.formData.id;this.$confirm("确认审核吗?","提示",{type:"warning"}).then(function(){t.$api.saleStockAPI.auditSalesStock({id:e}).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.getDetail()):t.$message({message:e.msg,type:"error"})})})},disAudit:function(){var t=this,e=this.formData.id;this.$confirm("确认反审核吗?","提示",{type:"warning"}).then(function(){t.$api.saleStockAPI.reverseAuditSalesStock({id:e}).then(function(e){0===e.code?(t.$message({message:e.msg,type:"success"}),t.getDetail()):t.$message({message:e.msg,type:"error"})})})},getUser:function(t){t&&(this.formData.salesUserName=t.name,this.formData.salesUser=t.id,this.formData.deptName=t.deptName,this.formData.deptId=t.deptId)},getClientr:function(t){t&&(this.formData.clientName=t.client_name,this.formData.clientId=t.id,this.formData.salesUserName=t.belongSalesmanName?t.belongSalesmanName:this.userInfo.name,this.formData.salesUser=t.belongSalesman?t.belongSalesman:this.userInfo.userId,this.formData.deptName=t.belongDeptName?t.belongDeptName:this.userInfo.deptName,this.formData.deptId=t.belongDept?t.belongDept:this.userInfo.deptId,this.formData.linkName=t.linkman_name?t.linkman_name:"",this.formData.linkPhone=t.linkman_phone?t.linkman_phone:"",this.formData.harvestAddress=t.harvestAddress?t.harvestAddress:"")},getOperator:function(t){t&&(this.formData.operatorName=t.name,this.formData.operator=t.id)},ChooseImportShow:function(){this.formData.clientId?this.ChooseSalesOutStockVisible=!0:this.$message({message:"请先选择客户",type:"warning"})},getSalesOutStock:function(t){var e=this;console.log(t),t&&t.forEach(function(t){console.log(t),e.formData.projectName=t.projectName?t.projectName:"",e.formData.projectId=t.projectId?t.projectId:"",e.$set(t,"btnName","查询"),e.$set(t,"availableCount",t.count?t.count:0),e.$set(t,"count",t.convCoefficient?parseFloat((t.subQuoteCount*t.convCoefficient).toFixed(t.quantityAccuracy)):0),e.$set(t,"sellUnitPrice",t.sellUnitPrice?t.sellUnitPrice:0),e.$set(t,"sellAmount",t.sellAmount?t.sellAmount:0),e.$set(t,"unitPrice",0),e.$set(t,"amount",0),e.$set(t,"materielId",t.materielId),e.$set(t,"onlyId",t.id+"_"+Math.random()),delete t.id,e.model.childList.push(t)})},getMateriel:function(t){var e=this;t&&t.forEach(function(t){e.$set(t,"count",0),e.$set(t,"subQuoteCount",0),e.$set(t,"btnName","查询"),e.$set(t,"sellUnitPrice",0),e.$set(t,"unitPrice",t.salePrice?t.salePrice:0),e.$set(t,"materielSerialNo",t.serialNo?t.serialNo:""),e.$set(t,"materielName",t.name?t.name:""),e.$set(t,"materielId",t.id),e.model.childList.push(t)})},removePart:function(){var t=this;if(this.chooseParts){var e=[];this.chooseParts.forEach(function(a){e.push(a.id);var o=t.model.childList.findIndex(function(t){if(t.onlyId==a.onlyId&&t.id==a.id)return!0});t.model.childList.splice(o,1),t.itemIds=e})}},handlePartChange:function(t){this.chooseParts=t,console.log(this.chooseParts),this.setBtn(t)},setBtn:function(t){var e=!0,a=!0;t.length>0?(a=!1,1==t.length&&(e=!1)):(e=!0,a=!0),this.btnDelDisabled=a,this.btnOtherDisabled=e},copy:function(){var t=this;console.log(this.chooseParts),JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(this.chooseParts)).forEach(function(e){console.log(e),t.$set(e,"count",0),t.$set(e,"subQuoteCount",0),t.$set(e,"sellUnitPrice",0),t.$set(e,"btnName","查询"),delete e.id,delete e.batch,delete e.unitPrice,delete e.facName,delete e.locationName,delete e.availableCount,t.model.childList.push(e)})},print:function(t){this.printDirection=t,document.getElementById("print_content").style.display="block",this.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(this.printList)),this.$nextTick(function(){var e=void 0;e=t?"<style>@page{size: A4 portrait;}</style></body></html>":"<style>@page{size: A5 landscape;}</style></body></html>";var a=document.getElementById("print_content").innerHTML;return document.body.innerHTML="<html><head><title>打印</title></head><body>"+a+e,window.print(),window.location.reload(),!1})},printNew:function(t){var e=void 0;if(10184===t.id)this.printDirection=0,e="<style>@page{size: 794px 1123px;}</style></body></html>";else if(10185===t.id){this.printDirection=1;e="<style>@page{size: 794px 562px;}</style></body></html>"}else 10186===t.id&&(this.printDirection=2,e="<style>@page{size: 794px 475px;}</style></body></html>");document.getElementById("print_content").style.display="block",this.printList=JSON.parse(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default()(this.printList)),this.$nextTick(function(){var t=document.getElementById("print_content").innerHTML;return document.body.innerHTML="<html><head><title>打印</title><style>@page:right{@bottom-left {content: 'ces'}}</style></head><body>"+t+e,window.print(),window.location.reload(),!1})},getSummaries:function(t){for(var e=t.columns,a=t.data,o=0,s=0,i=0;i<a.length;i++)o+=a[i].count,s+=a[i].subQuoteCount;this.printTotal.count=o,this.printTotal.subQuoteCount=s;var r=0,l=0;if(a.length>1)for(var n=0;n<a.length;n++)n<a.length&&(r=a[n].subQuoteCount*a[n].unitPrice?a[n].subQuoteCount*a[n].unitPrice+r:r,l=a[n].subQuoteCount*a[n].sellUnitPrice?a[n].subQuoteCount*a[n].sellUnitPrice+l:l);else 1==a.length&&(r=a[0].subQuoteCount*a[0].unitPrice?a[0].subQuoteCount*a[0].unitPrice:0,l=a[0].subQuoteCount*a[0].sellUnitPrice?a[0].subQuoteCount*a[0].sellUnitPrice:0);this.printTotal.amount=r,this.printTotal.sellAmount=l;for(var c=[],u=0;u<a.length;u++)a[u].subQuoteCount&&a[u].sellUnitPrice&&a[u].subQuoteCount*a[u].sellUnitPrice;return e.forEach(function(t,e){if(0!==e)if(6==e||9==e||14==e||16==e)if(14!=e)if(16!=e){var o=a.map(function(e){return Number(e[t.property])});o.every(function(t){return isNaN(t)})?c[e]="":c[e]=o.reduce(function(t,e){var a=Number(e);return isNaN(a)?t:t+e},0)}else{for(var s=0,i=0;i<a.length;i++)a[i].amount&&(s+=Number(a[i].amount));c[e]=s}else{for(var r=0,l=0;l<a.length;l++)a[l].sellAmount&&(r+=Number(a[l].sellAmount));c[e]=r}else c[e]="";else c[e]="合计"}),c},openDetails:function(t){this.ChooseStockVisible=!0,console.log(t),this.materielId=t.row.materielId,1==this.formData.salesType?this.supportUom=t.row.supportUom:this.supportUom="",this.currentIndex=t.$index},getStock:function(t){console.log(t),t&&(this.$set(this.model.childList[this.currentIndex],"btnName","已查询"),this.$set(this.model.childList[this.currentIndex],"stockId",t.id),this.$set(this.model.childList[this.currentIndex],"batch",t.batch),this.$set(this.model.childList[this.currentIndex],"batch",t.batch),this.$set(this.model.childList[this.currentIndex],"convCoefficient",t.convCoefficient),this.$set(this.model.childList[this.currentIndex],"supportUomName",t.supportUomName),this.$set(this.model.childList[this.currentIndex],"supportUom",t.supportUom),this.$set(this.model.childList[this.currentIndex],"facName",t.facilityName),this.$set(this.model.childList[this.currentIndex],"locationName",t.facilityLocationName),this.$set(this.model.childList[this.currentIndex],"availableCount",t.availableCount),this.changeCount2(this.model.childList[this.currentIndex]))},changeCount2:function(t){isNaN(t.convCoefficient)||isNaN(t.subQuoteCount)?t.count=0:t.count=parseFloat((parseFloat(t.convCoefficient)*parseFloat(t.subQuoteCount)).toFixed(t.quantityAccuracy)),this.changeCount(t)},goToLink:function(t){this.$router.push({path:"/sales/deliveryNote_add",query:{id:t,t:Date.now()}})}})}},e4t6:function(t,e){}});