12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117 |
- <template>
- <div class="SuppliesInventory-all">
- <el-dialog top="10vh" width="1200px" title="入库审核" :visible.sync="Warehousingaudit">
- <div class="warehousingaudit-search">
- <!-- <div class="warehousingaudit-search-li">
- <label>物品类型:</label>
- <el-select @change="Warehousingchange" clearable filterable style="width: 180px;" size="small" v-model="WarehousingTypes" placeholder="请选择">
- <el-option
- v-for="item in RSAuditTypearr"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div> -->
- <div class="warehousingaudit-search-li">
- <label>审核状态:</label>
- <el-select @change="Warehousingchange" style="width: 120px;" size="small" v-model="WarehousingStatus" placeholder="请选择">
- <el-option
- v-for="item in WarehousingStatusarr"
- :key="item.value"
- :label="item.text"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div class="warehousingaudit-search-li">
- <label>物品名称:</label>
- <el-input style="width: 160px;" size="small" placeholder="请输入物品名称" v-model="Warehousingname" clearable></el-input>
- </div>
- <el-button @click="Warehousingchange" style="margin-left: 10px;" size="small" type="primary">查询</el-button>
- </div>
- <div class="warehousingaudit-table">
- <el-table
- height="590px"
- :data="WarehousingData"
- border
- style="width: 100%">
- <el-table-column
- prop="goodsName"
- label="物品名称"
- width="200">
- </el-table-column>
- <el-table-column
- prop="quantity"
- label="数量"
- width="50">
- </el-table-column>
- <el-table-column
- prop="createTime"
- label="入库时间"
- width="150">
- </el-table-column>
- <el-table-column
- prop="createUserName"
- label="入库人"
- width="70">
- </el-table-column>
- <el-table-column
- prop="statusDesc"
- label="审核情况"
- width='200'>
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="450"
- trigger="hover">
- <!-- {{scope.row.statusDesc}} -->
- <span v-html="scope.row.statusDesc"></span>
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.statusDesc}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="confirmStatusText"
- label="审核状态"
- width="100">
- </el-table-column>
- <el-table-column
- prop="remark"
- label="备注"
- width='200'>
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- <span v-html="scope.row.remark"></span>
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- label="操作">
- <template slot-scope="scope">
- <el-button size="mini" type="primary" title="通过" @click="GoodsStorageConfirmStatusChange(scope.row,2)" >通过</el-button>
- <el-button size="mini" title="不通过" type="danger" @click="GoodsStorageConfirmStatusChange(scope.row,3)">不通过</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div class="block">
- <el-pagination
- @size-change="WarehousingSizeChange"
- @current-change="WarehousingCurrentChange"
- :current-page="WarehousingcurrentPage"
- :page-sizes="[10, 15, 20, 40]"
- :page-size="Warehousingpagesize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="Warehousingcount">
- </el-pagination>
- </div>
- </div>
- </el-dialog>
- <el-dialog top="10vh" width="1740px" title="领用记录" :visible.sync="ReceiptRecord">
- <div class="ReceiptRecord-search">
- <div class="ReceiptRecord-search-li">
- <label style="margin-left: 0px;">关联团组:</label>
- <el-select multiple collapse-tags filterable style="width: 235px;" size="small" v-model="groupID" placeholder="请选择">
- <el-option
- :style="item.id==0||item.id==-1?'color:#67c23a;':''"
- v-for="item in groupNameData"
- :key="item.id"
- :label="item.groupName"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <div class="ReceiptRecord-search-li">
- <label>物品类型:</label>
- <el-select multiple collapse-tags filterable style="width: 180px;" size="small" v-model="RSAuditTypes" placeholder="请选择">
- <el-option
- v-for="item in RSAuditTypearr"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <div class="ReceiptRecord-search-li">
- <label>领用人员:</label>
- <el-select multiple collapse-tags filterable style="width: 180px;" size="small" v-model="personnelID" placeholder="请选择">
- <el-option
- v-for="item in userNameData"
- :key="item.id"
- :label="item.userName"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <div class="ReceiptRecord-search-li">
- <label>审核状态:</label>
- <el-select style="width: 120px;" size="small" v-model="RSAuditStatus" placeholder="请选择">
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div class="ReceiptRecord-search-li">
- <label>物品名称:</label>
- <el-input style="width: 160px;" size="small" placeholder="请输入物品名称" v-model="RSAuditname" clearable></el-input>
- </div>
- <div class="ReceiptRecord-search-li">
- <label>领用时间段:</label>
- <el-date-picker
- size="small"
- style="width: 240px;"
- v-model="RSAudittime"
- type="daterange"
- align="right"
- unlink-panels
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- :picker-options="pickerOptionss">
- </el-date-picker>
- </div>
- <el-button style="margin-left: 10px;" @click="RecordsGoodsReceiveList(false)" size="small" type="primary">查询</el-button>
- <el-button style="margin-left: 10px;" @click="RecordsGoodsReceiveList(true)" size="small" type="primary">导出</el-button>
- </div>
- <div class="ReceiptRecord-table">
- <el-table
- height="530px"
- :data="RSAuditData"
- border
- style="width: 100%">
- <el-table-column
- prop="goodsName"
- label="物品名称"
- width="200">
- </el-table-column>
- <el-table-column
- prop="quantity"
- label="数量"
- width="50">
- </el-table-column>
- <el-table-column
- prop="createTime"
- label="申请时间"
- width="150">
- </el-table-column>
- <el-table-column
- prop="createUserName"
- label="申请人"
- width="70">
- </el-table-column>
- <el-table-column
- prop="reason"
- label="申请原因"
- >
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- {{scope.row.reason}}
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.reason}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="remark"
- label="备注">
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- {{scope.row.remark}}
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="auditUserName"
- label="审核人"
- width="100">
- <template slot-scope="scope">
- {{ scope.row.auditStatus==0?"":scope.row.auditUserName }}
- </template>
- </el-table-column>
- <el-table-column
- prop="auditTime"
- label="审核时间"
- width="150">
- <template slot-scope="scope">
- {{ scope.row.auditStatus==0?"":scope.row.auditTime }}
- </template>
- </el-table-column>
- <el-table-column
- prop="auditStatusText"
- label="审核状态"
- width="100">
- </el-table-column>
- </el-table>
- <div v-if="RSAuditcount>RSAuditpagesize" class="block">
- <el-pagination
- @size-change="RSAuditSizeChange"
- @current-change="RSAuditCurrentChange"
- :current-page="RSAuditcurrentPage"
- :page-sizes="[10, 15, 20, 40]"
- :page-size="RSAuditpagesize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="RSAuditcount">
- </el-pagination>
- </div>
- </div>
- </el-dialog>
- <el-dialog top="10vh" class="Approval-dialog" width="1350px" title="领用审核" :visible.sync="ApprovalVisible">
- <div>
- <el-select @change="typevaluechange" style="width: 150px;margin-bottom: 10px;" size="small" v-model="typevalue" placeholder="请选择">
- <el-option
- v-for="item in receiveStatus"
- :key="item.value"
- :label="item.text"
- :value="item.value">
- </el-option>
- </el-select>
- <el-input clearable size="small" style="width:200px" v-model="Approvalinput" placeholder="请输入内容"></el-input>
- <el-button @click="typevaluechange" size="small" type="primary">查 询</el-button>
- </div>
- <div class="Approval-table">
- <el-table
- :data="ApprovalData"
- border
- style="width: 100%">
- <el-table-column
- prop="goodsName"
- label="物品名称"
- width="180">
- </el-table-column>
- <el-table-column
- prop="quantity"
- label="数量"
- width="50">
- </el-table-column>
- <el-table-column
- prop="createTime"
- label="申请时间"
- width="150">
- </el-table-column>
- <el-table-column
- prop="createUserName"
- label="申请人"
- width="70">
- </el-table-column>
- <el-table-column
- prop="reason"
- label="申请原因"
- width="80">
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- {{scope.row.reason}}
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.reason}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="remark"
- label="备注">
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- {{scope.row.remark}}
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="auditStatusText"
- label="审核状态"
- width="100">
- </el-table-column>
- <el-table-column
- label="操作"
- width="450">
- <template slot-scope="scope">
- <el-button v-if="scope.row.auditStatus==0||scope.row.auditStatus==2" size="mini" type="primary" title="通过" @click="GoodsReceiveAudit(scope.row,1)" >通过</el-button>
- <el-button v-if="scope.row.auditStatus==0" size="mini" type="info" title="不通过" @click="GoodsReceiveAudit(scope.row,2)">不通过</el-button>
- <el-button v-if="scope.row.auditStatus==1" size="mini" type="warning" title="取消通过" @click="GoodsReceiveAudit(scope.row,0)">取消通过</el-button>
- <!-- <el-button size="mini" title="删除" type="danger" @click="Deleteintolibraryreceives(scope.row)">删除</el-button> -->
- <el-button size="mini" type="primary" title="通过" @click="GoodsReceiveAudit(scope.row,5)" >出库</el-button>
- <el-button size="mini" title="拒绝出库" type="danger" @click="GoodsReceiveAudit(scope.row,6)">拒绝出库</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div v-if="Approvalcount>Approvalpagesize" class="block">
- <el-pagination
- @size-change="ApprovalhandleSizeChange"
- @current-change="ApprovalhandleCurrentChange"
- :current-page="ApprovalcurrentPage"
- :page-sizes="[6, 10, 15, 40]"
- :page-size="Approvalpagesize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="Approvalcount">
- </el-pagination>
- </div>
- </div>
- </el-dialog>
- <el-dialog top="10vh" width="1200px" title="入库物品" :visible.sync="warehousingsVisible">
- <el-form :model="warehousingsruleForm" :rules="warehousingsrules" ref="warehousingsruleForm" label-width="100px" class="demo-ruleForm">
- <div class="warehousingsrule-input">
- <el-form-item label="入库数量" prop="quantity">
- <el-input-number @blur="Sumup" size="small" :precision="2" :controls="false" v-model="warehousingsruleForm.quantity"></el-input-number>
- </el-form-item>
- <el-form-item label="物品单价" prop="unitPrice">
- <el-input-number @blur="Sumup" size="small" :precision="1" :controls="false" v-model="warehousingsruleForm.unitPrice"></el-input-number>
- </el-form-item>
- <el-form-item label="物品总价" prop="totalPrice">
- <el-input-number size="small" :precision="2" :controls="false" v-model="warehousingsruleForm.totalPrice"></el-input-number>
- </el-form-item>
- <el-form-item label="供应商名称" prop="supplierName">
- <el-input size="small" placeholder="请输入物资名称" v-model="warehousingsruleForm.supplierName" clearable></el-input>
- </el-form-item>
- <el-form-item label="供应商电话" prop="supplierTel">
- <el-input size="small" placeholder="请输入供应商电话" v-model="warehousingsruleForm.supplierTel" clearable></el-input>
- </el-form-item>
- <el-form-item label="供应商地址" prop="supplierAddress">
- <el-input size="small" placeholder="请输入供应商地址" v-model="warehousingsruleForm.supplierAddress" clearable></el-input>
- </el-form-item>
- <el-form-item label="供应商来源" prop="supplierSource">
- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.supplierSource" clearable></el-input>
- </el-form-item>
- <el-form-item label="入库人员" prop="storageUserId">
- <el-select size="small" v-model="warehousingsruleForm.storageUserId" clearable filterable
- placeholder="请选择">
- <el-option v-for="item in userNameData" :key="item.id" :label="item.userName"
- :value="item.id">
- </el-option>
- </el-select>
- <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageUserId" clearable></el-input> -->
- </el-form-item>
- <el-form-item label="入库时间" prop="storageTime">
- <el-date-picker
- size="small"
- style="width:100%"
- v-model="warehousingsruleForm.storageTime"
- type="datetime"
- placeholder="选择日期时间"
- align="right"
- :picker-options="pickerOptions">
- </el-date-picker>
- <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageTime" clearable></el-input> -->
- </el-form-item>
- <el-form-item style="width:100%;" label="备注" prop="remark">
- <el-input size="small" placeholder="请输入备注称" v-model="warehousingsruleForm.remark" clearable></el-input>
- </el-form-item>
- </div>
- <el-form-item style="text-align: right;">
- <el-button size="small" @click="resetForm('warehousingsruleForm')">清空</el-button>
- <el-button size="small" type="primary" @click="submitForm('warehousingsruleForm')">保存</el-button>
- </el-form-item>
- </el-form>
- <div class="warehousingsrule-table">
- <el-table
- height="400"
- :data="warehousingslist"
- border
- style="width: 100%">
- <el-table-column
- prop="unitPrice"
- label="物品单价"
- width="80">
- <template slot-scope="scope">
- {{townum(scope.row.unitPrice)}}
- </template>
- </el-table-column>
- <el-table-column
- prop="quantity"
- label="物品数量"
- width="70">
- </el-table-column>
- <el-table-column
- prop="totalPrice"
- label="物品总价"
- width="80">
- <template slot-scope="scope">
- {{townum(scope.row.totalPrice)}}
- </template>
- </el-table-column>
- <el-table-column
- prop="supplierName"
- label="供应商名称">
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- {{scope.row.supplierName}}
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierName}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="supplierTel"
- label="供应商电话">
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- {{scope.row.supplierTel}}
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierTel}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="supplierAddress"
- label="供应商地址">
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- {{scope.row.supplierAddress}}
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierAddress}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="supplierSource"
- label="供应商来源">
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- {{scope.row.supplierSource}}
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.supplierSource}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="storageTime"
- label="入库时间"
- width="150">
- </el-table-column>
- <el-table-column
- prop="storageUserName"
- label="入库人"
- width="80">
- </el-table-column>
- <el-table-column
- label="操作"
- width="155">
- <template slot-scope="scope">
- <el-button size="mini" title="编辑" @click="Editentry(scope.row)">编辑</el-button>
- <el-button size="mini" title="删除" type="danger" @click="Deleteintolibrary(scope.row)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div v-if="WScount>WSpagesize" class="block">
- <el-pagination
- @size-change="WShandleSizeChange"
- @current-change="WShandleCurrentChange"
- :current-page="WScurrentPage"
- :page-sizes="[6, 10, 15, 40]"
- :page-size="WSpagesize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="WScount">
- </el-pagination>
- </div>
- </div>
- </el-dialog>
- <el-dialog width="400px" title="添加物品" :visible.sync="AddItemsVisible">
- <div class="additems-ul">
- <div class="additems-li">
- <label>物资类型:</label>
- <el-select style="width:250px" @change="AddMaterialTypechange(0)" v-model="AddMaterialType" clearable filterable
- placeholder="请选择">
- <el-option v-for="item in AddMaterialTypearr" :key="item.id" :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <div class="additems-li">
- <label>物资详细类型:</label>
- <el-select style="width:250px" v-model="AddMaterialinfoType" clearable filterable
- placeholder="请选择">
- <el-option v-for="item in AddMaterialinfoTypearr" :key="item.id" :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <div class="additems-li">
- <label>物资名称:</label>
- <el-input
- style="width:250px"
- placeholder="请输入物资名称"
- v-model="AdditemsName"
- clearable>
- </el-input>
- </div>
- <div class="additems-li">
- <label>单位:</label>
- <el-input
- style="width:250px"
- placeholder="请输入单位"
- v-model="unit"
- clearable>
- </el-input>
- </div>
- </div>
- <div>
- <label>备注:</label>
- <el-input
- style="width:100%;"
- type="textarea"
- :autosize="{ minRows: 2, maxRows: 4}"
- placeholder="请输入内容"
- v-model="Additemstextarea">
- </el-input>
- </div>
- <div class="additems-btn">
- <el-button @click="AddItemsVisible=false">取消</el-button>
- <el-button @click="GoodsOP" type="primary">保存</el-button>
- </div>
- </el-dialog>
- <el-dialog top="10vh" title="领用物品" width="1000px" :visible.sync="ClaimitemVisible">
- <label style="display: inline-block;margin-left: 32px;margin-bottom: 10px;">{{Claimitemlabel}}</label>
- <el-form :model="ClaimsruleForm" :rules="Claimrules" ref="ClaimsruleForm" label-width="100px" class="demo-ruleForm">
- <div class="Claimitem-input">
- <el-form-item label="关联团组" prop="groupId">
- <el-select size="small" v-model="ClaimsruleForm.groupId" clearable filterable
- placeholder="请选择">
- <el-option :style="item.id==0||item.id==-1||item.id==-2?'color:#67c23a;':''" v-for="item in groupNameData" :key="item.id" :label="item.groupName"
- :value="item.id">
- </el-option>
- </el-select>
- <!-- <el-input-number size="small" :precision="2" :controls="false" v-model="ClaimsruleForm.groupId"></el-input-number> -->
- </el-form-item>
- <el-form-item label="领用数量" prop="quantity">
- <el-input-number size="small" :precision="2" :controls="false" v-model="ClaimsruleForm.quantity"></el-input-number>
- </el-form-item>
- <el-form-item label="领用原因" prop="reason">
- <el-input size="small" placeholder="请输入领用原因" v-model="ClaimsruleForm.reason"></el-input>
- </el-form-item>
- </div>
- <el-form-item label="备注" prop="remark">
- <el-input size="small" placeholder="请输入备注" v-model="ClaimsruleForm.remark"></el-input>
- </el-form-item>
- <el-form-item style="text-align: right;">
- <el-button size="small" @click="ClaimresetForm('ClaimsruleForm')">清空</el-button>
- <el-button size="small" type="primary" @click="ClaimsubmitForm('ClaimsruleForm')">保存</el-button>
- </el-form-item>
- </el-form>
- <div class="claimitem-table">
- <el-table
- height="400"
- :data="ClaimitemData"
- border
- style="width: 100%">
- <el-table-column
- prop="goodsName"
- label="物品名称"
- width="180">
- </el-table-column>
- <el-table-column
- prop="quantity"
- label="数量"
- width="45">
- </el-table-column>
- <el-table-column
- prop="createTime"
- label="申请时间"
- width="150">
- </el-table-column>
- <el-table-column
- prop="createUserName"
- label="申请人"
- width="70">
- </el-table-column>
- <el-table-column
- prop="reason"
- label="申请原因"
- width="80">
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- {{scope.row.reason}}
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.reason}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="remark"
- label="备注">
- <template slot-scope="scope">
- <el-popover
- placement="top"
- width="300"
- trigger="hover">
- {{scope.row.remark}}
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;cursor: pointer;color: #48a2ff;" slot="reference">{{scope.row.remark}}</span>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- prop="auditStatusText"
- label="审核状态"
- width="80">
- </el-table-column>
- <el-table-column
- label="操作"
- width="200">
- <template slot-scope="scope">
- <el-button size="mini" title="编辑" @click="Editentryreceive(scope.row)">编辑</el-button>
- <el-button size="mini" title="删除" type="danger" @click="Deleteintolibraryreceive(scope.row)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div v-if="Claimitemcount>Claimitempagesize" class="block">
- <el-pagination
- @size-change="ClaimitemhandleSizeChange"
- @current-change="ClaimitemhandleCurrentChange"
- :current-page="ClaimitemcurrentPage"
- :page-sizes="[6, 10, 15, 40]"
- :page-size="Claimitempagesize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="Claimitemcount">
- </el-pagination>
- </div>
- </div>
- </el-dialog>
- <div class="SuppliesInventory-head">
- <div class="SuppliesInventory-head-ul">
- <div class="SuppliesInventory-head-li">
- <label>物资类型:</label>
- <el-select style="width:220px" @change="MaterialTypechange" v-model="MaterialType" clearable filterable
- placeholder="请选择">
- <el-option v-for="item in MaterialTypearr" :key="item.id" :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <div class="SuppliesInventory-head-li">
- <label>物资详细类型:</label>
- <el-select @change="MaterialinfoTypechange" style="width:220px" multiple collapse-tags v-model="MaterialinfoType" clearable filterable
- placeholder="请选择">
- <el-option v-for="item in MaterialinfoTypearr" :key="item.id" :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <div class="SuppliesInventory-head-li">
- <label>物资名称:</label>
- <el-input
- style="width:220px"
- placeholder="请输入内容"
- v-model="Materialname"
- clearable>
- </el-input>
- </div>
- <div class="SuppliesInventory-head-li">
- <el-button @click="GoodsList" type="primary">查 询</el-button>
- </div>
- </div>
- <div>
- <el-button v-if="Auditauthority" @click="GoodsStorageExcelDownload" type="primary">入库记录导出</el-button>
- <el-button v-if="Auditauthority" @click="inquireRecords" type="primary">领用记录</el-button>
- <el-button v-if="Auditauthority" @click="Warehousingwicket" type="primary">入库审核</el-button>
- <el-button v-if="Auditauthority" @click="GoodsReceiveLists" type="primary">审核</el-button>
- <el-button v-if="Addpermission" @click="addbtnclick" type="primary">新增物品</el-button>
- </div>
- </div>
- <div class="SuppliesInventory-table">
- <el-table
- :data="tableData"
- border
- style="width: 100%">
- <el-table-column
- prop="name"
- label="物品名称"
- width="180">
- </el-table-column>
- <el-table-column
- prop="typeName"
- label="物品详细类型"
- width="180">
- </el-table-column>
- <el-table-column
- prop="stockQuantity"
- label="物品数量"
- width="100">
- </el-table-column>
- <el-table-column
- prop="unit"
- label="单位"
- width="100">
- </el-table-column>
- <el-table-column
- prop="lastUpdateUserName"
- label="最后录入人"
- width="100">
- </el-table-column>
- <el-table-column
- prop="lastUpdateTime"
- label="最后录入时间"
- width="180">
- </el-table-column>
- <el-table-column
- prop="remark"
- label="备注">
- </el-table-column>
- <el-table-column
- label="操作"
- width="300">
- <template slot-scope="scope">
- <el-button v-if="Editpermission" size="mini" title="编辑" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
- <el-button v-if="Addpermission" size="mini" @click="instorage(scope.row)" type="primary">入库</el-button>
- <el-button size="mini" @click="GoodsReceiveList(scope.row)" type="success">领用</el-button>
- <el-button v-if="Deletepermission" size="mini" title="删除" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div v-if="count>pagesize" class="block">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- :page-sizes="[10, 15, 30, 40]"
- :page-size="pagesize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="count">
- </el-pagination>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- pickerOptionss: {
- shortcuts: [{
- text: '最近一周',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近一个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近三个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
- picker.$emit('pick', [start, end]);
- }
- }]
- },
- pickerOptions: {
- shortcuts: [{
- text: '今天',
- onClick(picker) {
- picker.$emit('pick', new Date());
- }
- }, {
- text: '昨天',
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24);
- picker.$emit('pick', date);
- }
- }, {
- text: '一周前',
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', date);
- }
- }]
- },
- Userid:'',
- token:"",
- MaterialType:'',
- MaterialTypearr:[],
- MaterialinfoType:[],
- MaterialinfoTypes:'',
- MaterialinfoTypearr:[],
- Materialname:'',
- tableData:[],
- AddItemsVisible:false,
- currentPage:1,
- pagesize:10,
- count:0,
- WScurrentPage:1,
- WSpagesize:6,
- WScount:0,
- ClaimitemcurrentPage:1,
- Claimitempagesize:6,
- Claimitemcount:0,
- ApprovalcurrentPage:1,
- Approvalpagesize:6,
- Approvalcount:0,
- //新增物品参数
- AddMaterialType:"",
- AddMaterialTypearr:[],
- AddMaterialinfoType:"",
- AddMaterialinfoTypearr:[],
- AdditemsName:"",
- unit:"",
- Additemstextarea:"",
- ID:0,
- groupNameData:[],
- //入库参数
- userNameData:[],
- warehousingslist:[],
- warehousingsVisible:false,
- warehousingsruleForm: {
- id:0,
- quantity: 0,
- unitPrice: 0,
- totalPrice: 0,
- supplierName: '',
- supplierTel: '',
- supplierAddress: '',
- supplierSource: '',
- storageUserId:'',
- storageTime:'',
- remark: ''
- },
- warehousingsrules: {
- quantity: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- unitPrice: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- totalPrice: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- supplierName: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- supplierTel: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- supplierAddress: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- supplierSource: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- storageUserId: [
- { required: true, message: '请选择', trigger: 'change' },
- ],
- storageTime: [
- { required: true, message: '请选择', trigger: 'blur' },
- ],
- remark: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- },
- typevalue:-1,
- //领用参数
- ClaimitemVisible:false,
- ClaimitemData:[],
- ClaimsruleForm:{
- id:0,
- groupId:'',
- quantity:0,
- reason:'',
- remark:'',
- },
- Claimrules:{
- groupId: [
- { required: true, message: '请选择', trigger: 'change' },
- ],
- quantity: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- reason: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- remark: [
- { required: true, message: '请输入', trigger: 'blur' },
- ],
- },
- Claimitemlabel:'',
- //审核参数
- options:[
- {
- value: '',
- label: '全部'
- },
- {
- value: 0,
- label: '待审核'
- },
- {
- value: 1,
- label: '审核通过'
- },
- {
- value: 2,
- label: '未通过'
- },
- ],
- ApprovalVisible:false,
- ApprovalData:[],
- Approvalinput:'',
- receiveStatus:[],
- //shqx
- Auditauthority:false,
- Editpermission:false,
- Addpermission:false,
- Deletepermission:false,
- //领用记录
- ReceiptRecord:false,
- groupID:[],
- groupIDarr:[],
- personnelID:[],
- personnelIDarr:[],
- RSAuditStatus:'',
- RSAuditname:'',
- RSAudittime:'',
- RSAuditTypes:[],
- RSAuditTypearr:[],
- RSAuditData:[],
- RSAuditcurrentPage:1,
- RSAuditpagesize:10,
- RSAuditcount:0,
- //入库审核
- Warehousingaudit:false,
- WarehousingTypes:'',
- WarehousingStatus:-1,
- WarehousingStatusarr:[],
- Warehousingname:'',
- WarehousingData:[],
- WarehousingcurrentPage:1,
- Warehousingpagesize:10,
- Warehousingcount:0,
- }
- },
- methods:{
- //保留两位小数
- townum(val){
- val=Number(val);
- return val.toFixed(2);
- },
- //处理日期
- datetimes(val){
- var date=new Date(val);
- var y=date.getFullYear();
- var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
- var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
- var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
- var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
- var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
- return y+'-'+m+'-'+d
- },
- //处理日期
- datetime(val){
- var date=new Date(val);
- var y=date.getFullYear();
- var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
- var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
- var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
- var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
- var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
- return y+'-'+m+'-'+d+" "+s+':'+f+':'+mm
- },
- //获取
- GoodsInitDataSource() {
- var url = "/api/PersonnelModule/GoodsInitDataSource"
- var that = this
- this.$axios({
- method: 'get',
- url: url,
- headers: {
- Authorization: 'Bearer '
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.MaterialTypearr=res.data.data.goodsTypeData;
- that.AddMaterialTypearr=res.data.data.goodsTypeData;
- that.userNameData=res.data.data.userNameData;
- that.groupNameData=res.data.data.groupNameData;
- that.WarehousingStatusarr=res.data.data.stockStatus;
- that.receiveStatus=res.data.data.receiveStatus;
- // that.groupNameData.unshift(
- // {
- // id:0,
- // groupName:"其他物资(公司内部物资)"
- // },
- // {
- // id:-1,
- // groupName:"拜访客户所使用的物资"
- // }
- // )
- // that.MaterialType=that.MaterialTypearr[0].id;
- that.MaterialTypechange();
- for (let k = 0; k < that.MaterialTypearr.length; k++) {
- for (let l = 0; l < that.MaterialTypearr[k].subTypeItems.length; l++) {
- that.RSAuditTypearr.push(that.MaterialTypearr[k].subTypeItems[l])
- }
- }
- } else {
- that.$message.error(res.data.msg);
- }
- })
- },
- //物资类型切换
- MaterialTypechange(val){
- this.MaterialinfoType="";
- this.MaterialinfoTypearr=[];
- for(let i=0;i<this.MaterialTypearr.length;i++){
- if(this.MaterialType==this.MaterialTypearr[i].id){
- this.MaterialinfoTypearr=this.MaterialTypearr[i].subTypeItems;
- }
- }
- if(val==undefined){
- this.GoodsList();
- }
- },
- //物资详情选择
- MaterialinfoTypechange(){
- this.MaterialinfoTypes=""
- for(let i=0;i<this.MaterialinfoType.length;i++){
- this.MaterialinfoTypes+=this.MaterialinfoType[i]+','
- }
- this.MaterialinfoTypes=this.MaterialinfoTypes.substring(0, this.MaterialinfoTypes.length - 1);
- },
- //入库
- Warehousingchange(){
- this.WarehousingcurrentPage=1;
- this.GoodsStorageList();
- },
- //入库审核列表
- GoodsStorageList(val){
- var url = "/api/PersonnelModule/GoodsStorageList"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer '+ that.token
- },
- data:{
- portType:1,
- pageIndex:that.WarehousingcurrentPage,
- pageSize:that.Warehousingpagesize,
- goodsId:that.WarehousingTypes==""?0:that.WarehousingTypes,
- currUserId:that.Userid,
- auditLabel:that.WarehousingStatus+'',
- goodsName:that.Warehousingname,
- batchNo:'',
- }
- }).then(function (res) {
- that.WarehousingData=[];
- if (res.data.code == 200) {
- that.WarehousingData=res.data.data;
- that.Warehousingcount=res.data.count;
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //add物资类型切换
- AddMaterialTypechange(val){
- if(val==0){
- this.AddMaterialinfoType="";
- }
- this.AddMaterialinfoTypearr=[];
- for(let i=0;i<this.AddMaterialTypearr.length;i++){
- if(this.AddMaterialType==this.AddMaterialTypearr[i].id){
- this.AddMaterialinfoTypearr=this.AddMaterialTypearr[i].subTypeItems;
- }
- }
- },
- //入库导出
- GoodsStorageExcelDownload(){
- var url = "/api/PersonnelModule/GoodsStorageExcelDownload"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer '+ that.token
- },
- }).then(function (res) {
- if (res.data.code == 200) {
- window.open(res.data.data.url);
- that.$message({
- type: 'success',
- message: res.data.msg
- });
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //获取列表
- GoodsList() {
- var url = "/api/PersonnelModule/GoodsList"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer '
- },
- data: {
- portType: 1,
- pageIndex: that.currentPage,
- pageSize: that.pagesize,
- typeIds: that.MaterialinfoTypes,
- goodsName: that.Materialname,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.count=res.data.count;
- that.tableData=res.data.data;
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //分页
- handleSizeChange(val) {
- this.currentPage=1;
- this.pagesize=val;
- this.GoodsList();
- },
- handleCurrentChange(val) {
- this.currentPage=val;
- this.GoodsList();
- },
- WShandleSizeChange(val) {
- this.WScurrentPage=1;
- this.WSpagesize=val;
- this.instorage({'id':this.ID});
- },
- WShandleCurrentChange(val) {
- this.WScurrentPage=val;
- this.instorage({'id':this.ID});
- },
- ClaimitemhandleSizeChange(val) {
- this.ClaimitemcurrentPage=1;
- this.Claimitempagesize=val;
- this.GoodsReceiveList({'id':this.ID});
- },
- ClaimitemhandleCurrentChange(val) {
- this.ClaimitemcurrentPage=val;
- this.GoodsReceiveList({'id':this.ID});
- },
- ApprovalhandleSizeChange(val) {
- this.ApprovalcurrentPage=1;
- this.Approvalpagesize=val;
- this.GoodsReceiveLists();
- },
- ApprovalhandleCurrentChange(val) {
- this.ApprovalcurrentPage=val;
- this.GoodsReceiveLists();
- },
- RSAuditSizeChange(val) {
- this.RSAuditcurrentPage=1;
- this.RSAuditpagesize=val;
- this.RecordsGoodsReceiveList(false);
- },
- RSAuditCurrentChange(val) {
- this.RSAuditcurrentPage=val;
- this.RecordsGoodsReceiveList(false);
- },
- WarehousingSizeChange(val) {
- this.WarehousingcurrentPage=1;
- this.Warehousingpagesize=val;
- this.GoodsStorageList();
- },
- WarehousingCurrentChange(val) {
- this.WarehousingcurrentPage=val;
- this.GoodsStorageList();
- },
- Warehousingwicket(){
- this.Warehousingaudit=true;
- this.GoodsStorageList();
- },
- //新增按钮
- addbtnclick(){
- this.ID=0;
- this.AdditemsName="";
- this.AddMaterialType="";
- this.AddMaterialinfoType="";
- this.Additemstextarea="";
- this.unit="";
- this.AddItemsVisible=true;
- },
-
- //入库审核
- GoodsStorageConfirmStatusChange(val,type){
- var auditDep=0
- for (let i = 0; i < val.auditPers.length; i++) {
- if (val.auditPers[i].auditPer==true) {
- auditDep=val.auditPers[i].auditDep
- }
- }
- if (auditDep==0) {
- return this.$message.error('没有审核权限');
- }
- var url = "/api/PersonnelModule/GoodsStorageConfirmStatusChange"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- },
- data:{
- id:val.id,
- auditDep:auditDep,
- confirmStatus:type,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- type: 'success',
- message: res.data.msg
- });
- that.GoodsStorageList();
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //编辑
- handleEdit(index,row){
- console.log(row);
- this.ID=row.id;
- var url = "/api/PersonnelModule/GoodsInfo?portType=1&id="+this.ID
- var that = this
- this.$axios({
- method: 'get',
- url: url,
- headers: {
- Authorization: 'Bearer '
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- var datainfo=res.data.data;
- that.Additemstextarea=datainfo.remark;
- that.AdditemsName=datainfo.name;
- that.AddMaterialType=datainfo.parentType;
- that.unit=datainfo.unit;
- that.AddMaterialinfoType=datainfo.type;
- that.AddItemsVisible=true;
- that.AddMaterialTypechange(2);
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //删除
- handleDelete(index,row){
- this.$confirm('此操作将永久删除, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- var url = "/api/PersonnelModule/GoodsDel/"+row.id
- var that = this
- this.$axios({
- method: 'delete',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- type: 'success',
- message: res.data.msg
- });
- that.GoodsList();
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
-
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- //计算总价
- Sumup(){
- console.log(123);
- this.warehousingsruleForm.totalPrice=this.warehousingsruleForm.quantity*this.warehousingsruleForm.unitPrice;
- },
- //新增物品api
- GoodsOP() {
- var url = "/api/PersonnelModule/GoodsOP"
- var that = this
- console.log(that.AdditemsName,that.AddMaterialinfoType,that.AddMaterialTypearr,that.unit);
-
- if (that.AdditemsName==""||that.AddMaterialinfoType==""||that.AddMaterialType==""||that.unit=="") {
- that.$message.error("检查是否填写完全!");
- return
- }
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- },
- data: {
- currUserId:that.Userid,
- id:that.ID,
- name:that.AdditemsName,
- type:that.AddMaterialinfoType,
- unit:that.unit,
- remark:that.Additemstextarea,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- message:res.data.msg ,
- type: 'success',
- offset:50
- });
- that.AddItemsVisible=false;
- that.GoodsList();
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //入库数据初始化
- rkcsh(){
- this.warehousingsruleForm={
- id:0,
- quantity: 0,
- unitPrice: 0,
- totalPrice: 0,
- supplierName: '',
- supplierTel: '',
- supplierAddress: '',
- supplierSource: '',
- storageUserId:'',
- storageTime:'',
- remark: ''
- }
- },
- //入库列表
- instorage(row){
- this.rkcsh();
- this.ID=row.id;
- this.warehousingsVisible=true;
- var url = "/api/PersonnelModule/GoodsStorageList"
- var that = this
- this.$axios({
- method: 'POST',
- url: url,
- headers: {
- Authorization: 'Bearer '
- },
- data:{
- portType:1,
- pageIndex:that.WScurrentPage,
- pageSize:that.WSpagesize,
- goodsId:row.id,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.WScount=res.data.count;
- that.warehousingslist=res.data.data;
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //入库api
- GoodsStorageOP(){
- var url = "/api/PersonnelModule/GoodsStorageOP"
- var that = this
- this.$axios({
- method: 'POST',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- },
- data:{
- id:that.warehousingsruleForm.id,
- goodsId:that.ID,
- quantity:that.warehousingsruleForm.quantity,
- unitPrice:that.warehousingsruleForm.unitPrice,
- totalPrice:that.warehousingsruleForm.totalPrice,
- supplierName:that.warehousingsruleForm.supplierName,
- supplierTel:that.warehousingsruleForm.supplierTel,
- supplierAddress:that.warehousingsruleForm.supplierAddress,
- supplierSource:that.warehousingsruleForm.supplierSource,
- storageUserId:that.warehousingsruleForm.storageUserId,
- storageTime:that.datetime(that.warehousingsruleForm.storageTime),
- remark:that.warehousingsruleForm.remark,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- message:res.data.msg ,
- type: 'success'
- });
- that.instorage({'id':that.ID});
- that.resetForm('warehousingsruleForm');
- that.GoodsList();
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //编辑入库
- Editentry(val){
- var url = "/api/PersonnelModule/GoodsStorageInfo/"+val.id+"?portType=1"
- var that = this
- this.$axios({
- method: 'get',
- url: url,
- headers: {
- Authorization: 'Bearer '
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- var datainfo=res.data.data;
- that.warehousingsruleForm.id=datainfo.id;
- that.warehousingsruleForm.quantity=datainfo.quantity;
- that.warehousingsruleForm.unitPrice=datainfo.unitPrice;
- that.warehousingsruleForm.totalPrice=datainfo.totalPrice;
- that.warehousingsruleForm.supplierName=datainfo.supplierName;
- that.warehousingsruleForm.supplierTel=datainfo.supplierTel;
- that.warehousingsruleForm.supplierAddress=datainfo.supplierAddress;
- that.warehousingsruleForm.supplierSource=datainfo.supplierSource;
- that.warehousingsruleForm.storageUserId=datainfo.storageUserId;
- that.warehousingsruleForm.storageTime=datainfo.storageTime;
- that.warehousingsruleForm.remark=datainfo.remark;
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //删除入裤
- Deleteintolibrary(row){
- this.$confirm('此操作将永久删除, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- var url = "/api/PersonnelModule/GoodsStorageDel/"+row.id
- var that = this
- this.$axios({
- method: 'delete',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- type: 'success',
- message: res.data.msg
- });
- that.instorage({'id':that.ID});
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
-
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- //入库
- submitForm(formName) {
- this.$refs[formName].validate((valid) => {
- if (valid) {
- this.GoodsStorageOP();
- } else {
- return false;
- }
- });
- },
- resetForm(formName) {
- this.warehousingsruleForm.id=0;
- this.$refs[formName].resetFields();
- },
- //领用
- ClaimsubmitForm(formName) {
- this.$refs[formName].validate((valid) => {
- if (valid) {
- this.GoodsReceiveOP();
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- ClaimresetForm(formName) {
- this.Claimitemlabel="";
- this.ClaimsruleForm.id=0;
- this.$refs[formName].resetFields();
- },
- //审核状态切换
- typevaluechange(){
- this.ApprovalcurrentPage=1;
- this.GoodsReceiveLists();
- },
- //领用审核列表
- GoodsReceiveLists(){
- this.ApprovalData=[];
- this.ApprovalVisible=true
- var url = "/api/PersonnelModule/GoodsReceiveList"
- var that = this
- this.$axios({
- method: 'POST',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- },
- data:{
- portType:1,
- pageIndex:that.ApprovalcurrentPage,
- pageSize:that.Approvalpagesize,
- goodsId:0,
- userLabel:'',
- goodsName:that.Approvalinput,
- beginDt:'',
- endDt:'',
- groupLabel:'',
- typeLabel:'',
- auditLabel:that.typevalue+'',
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.ApprovalData=res.data.data;
- that.Approvalcount=res.data.count;
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //查询领用记录
- inquireRecords(){
- this.ReceiptRecord=true;
- this.RecordsGoodsReceiveList(false);
- },
- //领用记录
- RecordsGoodsReceiveList(isExcelDownload){
- let groupID="";
- for(let g=0;g<this.groupID.length;g++){
- groupID+=this.groupID[g]+',';
- }
- groupID=groupID.substring(0, groupID.length - 1);
- let personnelID="";
- for (let p = 0; p < this.personnelID.length; p++) {
- personnelID += this.personnelID[p]+',';
- }
- personnelID=personnelID.substring(0, personnelID.length - 1);
- let RSAuditTypes="";
- for (let r = 0; r < this.RSAuditTypes.length; r++) {
- RSAuditTypes += this.RSAuditTypes[r]+",";
- }
- RSAuditTypes=RSAuditTypes.substring(0, RSAuditTypes.length - 1);
- var url = "/api/PersonnelModule/GoodsReceiveList"
- var that = this
- this.$axios({
- method: 'POST',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- },
- data:{
- portType:1,
- pageIndex:that.RSAuditcurrentPage,
- pageSize:that.RSAuditpagesize,
- goodsId:0,
- userLabel:personnelID,
- goodsName:that.RSAuditname,
- beginDt:that.RSAudittime?that.datetimes(that.RSAudittime[0]):'',
- endDt:that.RSAudittime?that.datetimes(that.RSAudittime[1]):'',
- groupLabel:groupID,
- typeLabel:RSAuditTypes,
- auditLabel:that.RSAuditStatus+"",
- isExcelDownload:isExcelDownload,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- let Datalist=res.data;
- if (isExcelDownload==true) {
- window.open(Datalist.data.url)
- return
- }
- that.RSAuditData=Datalist.data;
- that.RSAuditcount=Datalist.count;
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //领用列表
- GoodsReceiveList(row){
- this.Claimitemlabel="";
- if(row.stockQuantity<=0){
- this.$message.error("已无库存!");
- return
- }
- this.bjcsh();
- this.ClaimitemData=[];
- this.ID=row.id;
- this.ClaimitemVisible=true;
- var url = "/api/PersonnelModule/GoodsReceiveList"
- var that = this
- this.$axios({
- method: 'POST',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- },
- data:{
- portType:1,
- pageIndex:that.ClaimitemcurrentPage,
- pageSize:that.Claimitempagesize,
- goodsId:row.id,
- userLabel:that.Userid+'',
- goodsName:'',
- beginDt:'',
- endDt:'',
- groupLabel:'',
- typeLabel:'',
- auditLabel:'',
- isExcelDownload:false,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.ClaimitemData=res.data.data;
- that.Claimitemcount=res.data.count;
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //领用api
- GoodsReceiveOP(){
- var url = "/api/PersonnelModule/GoodsReceiveOP"
- var that = this
- this.$axios({
- method: 'POST',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- },
- data:{
- id:that.ClaimsruleForm.id,
- groupId:that.ClaimsruleForm.groupId,
- goodsId:that.ID,
- quantity:that.ClaimsruleForm.quantity,
- reason:that.ClaimsruleForm.reason,
- remark:that.ClaimsruleForm.remark,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- type: 'success',
- message: res.data.msg
- });
- that.ClaimresetForm("ClaimsruleForm");
- that.GoodsReceiveList({'id':that.ID});
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //编辑初始化
- bjcsh(){
- this.ClaimsruleForm={
- id:0,
- groupId:'',
- quantity:0,
- reason:'',
- remark:'',
- }
- },
- //编辑领用
- Editentryreceive(val){
- var url = "/api/PersonnelModule/GoodsReceiveInfo/"+val.id+"?portType=1"
- var that = this
- this.$axios({
- method: 'get',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- var datainfo=res.data.data;
- that.ClaimsruleForm.id=datainfo.id;
- that.ClaimsruleForm.groupId=datainfo.groupId;
- that.ClaimsruleForm.quantity=datainfo.quantity;
- that.ClaimsruleForm.reason=datainfo.reason;
- that.ClaimsruleForm.remark=datainfo.remark;
- that.Claimitemlabel=datainfo.goodsStorageInfoStr;
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- //审核列表删除
- Deleteintolibraryreceives(row){
- this.$confirm('此操作将永久删除, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- var url = "/api/PersonnelModule/GoodsReceiveDel/"+row.id
- var that = this
- this.$axios({
- method: 'delete',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- type: 'success',
- message: res.data.msg
- });
- that.GoodsReceiveLists();
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
-
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- //删除领用
- Deleteintolibraryreceive(row){
- this.$confirm('此操作将永久删除, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- var url = "/api/PersonnelModule/GoodsReceiveDel/"+row.id
- var that = this
- this.$axios({
- method: 'delete',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- type: 'success',
- message: res.data.msg
- });
- that.GoodsReceiveList({'id':that.ID});
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
-
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- //审核领用
- GoodsReceiveAudit(row,val){
- var auditDep=0
- for (let i = 0; i < row.auditPers.length; i++) {
- if (row.auditPers[i].auditPer==true) {
- auditDep=row.auditPers[i].auditDep
- }
- }
- if (auditDep==0) {
- return this.$message.error('没有审核权限');
- }
- var url = "/api/PersonnelModule/GoodsReceiveAudit"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- },
- data:{
- label:row.id+'',
- auditEnum:val,
- }
- }).then(function (res) {
- if (res.data.code == 200) {
- that.$message({
- type: 'success',
- message: res.data.msg
- });
- that.GoodsReceiveLists();
- if(that.tableData.length>0){
- that.GoodsList();
- }
-
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("操作错误,联系信息部!");
- });
- },
- },
- mounted(){
- //权限
- let authData=JSON.parse(localStorage.getItem('userinif')).authData;
- let Permissions=[];
- for(let k=0;k<authData.length;k++){
- for(let m=0;m<authData[k].pageList.length;m++){
- if (authData[k].pageList[m].webUrl=='/SuppliesInventory') {
- Permissions=authData[k].pageList[m].pageAuth;
- }
- }
- }
- for (let r = 0; r < Permissions.length; r++) {
- if (Permissions[r].funid==12) {
- this.Auditauthority=true;
- }
- if (Permissions[r].funid==3) {
- this.Editpermission=true;
- }
- if (Permissions[r].funid==11) {
- this.Addpermission=true;
- }
- if (Permissions[r].funid==2) {
- this.Deletepermission=true;
- }
- }
- this.Userid=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
- this.token=JSON.parse(localStorage.getItem('userinif')).token;
- this.GoodsInitDataSource();
- }
- }
- </script>
- <style>
- .SuppliesInventory-all {
- background-color: #fff;
- padding: 10px;
- box-shadow: 0 0 5px #0005;
- border-radius: 10px;
- min-height: 830px;
- min-width: 1535px;
- }
- .SuppliesInventory-head{
- display: flex;
- justify-content: space-between;
- }
- .SuppliesInventory-head-li{
- margin-right: 15px;
- }
- .SuppliesInventory-head-li label{
- font-size: 14px;
- color: #555;
- }
- .SuppliesInventory-table{
- margin-top: 15px;
- }
- .SuppliesInventory-head-ul{
- display: flex;
- }
- .additems-li{
- margin-bottom: 10px;
- }
- .additems-btn{
- text-align: right;
- margin-top: 20px;
- }
- .warehousingsrule-input{
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- }
- .warehousingsrule-input .el-form-item{
- width: 33%;
- }
- .warehousingsrule-input .el-input-number{
- width: 100%;
- }
- .warehousingsrule-input .el-form-item{
- margin-bottom: 10px;
- }
- .warehousingsrule-input .el-form-item__error{
- top: 82%;
- }
- .warehousingsrule-input .el-select{
- width: 100%;
- }
- .warehousingsrule-table .el-table th.el-table__cell>.cell{
- text-align: center;
- font-size: 12px;
- }
- .warehousingsrule-table .el-table td.el-table__cell div{
- font-size: 12px;
- }
- .SuppliesInventory-table .block{
- text-align: center;
- margin-top: 10px;
- }
- .warehousingsrule-table .block{
- text-align: center;
- margin-top: 10px;
- }
- .additems-li label{
- display: inline-block;
- width: 105px;
- }
- .Claimitem-input{
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- }
- .Claimitem-input .el-form-item{
- width: 33%;
- }
- .Claimitem-input .el-input-number{
- width: 100%;
- }
- .Claimitem-input .el-form-item{
- margin-bottom: 10px;
- }
- .Claimitem-input .el-form-item__error{
- top: 82%;
- }
- .claimitem-table .el-table th.el-table__cell>.cell{
- text-align: center;
- font-size: 12px;
- }
- .claimitem-table .el-table td.el-table__cell div{
- font-size: 12px;
- }
- .claimitem-table .block{
- text-align: center;
- margin-top: 10px;
- }
- .Approval-table .el-table th.el-table__cell>.cell{
- text-align: center;
- font-size: 12px;
- }
- .Approval-table .el-table td.el-table__cell div{
- font-size: 12px;
- }
- .Approval-table .block{
- text-align: center;
- margin-top: 10px;
- }
- .ReceiptRecord-table .el-table th.el-table__cell>.cell{
- text-align: center;
- font-size: 12px;
- }
- .ReceiptRecord-table .el-table td.el-table__cell div{
- font-size: 12px;
- }
- .ReceiptRecord-table .block{
- text-align: center;
- margin-top: 10px;
- }
- .Approval-dialog .el-dialog__body{
- padding-top: 0px;
-
- }
- .ReceiptRecord-search{
- display: flex;
- }
- .ReceiptRecord-search-li label{
- margin-left: 10px;
- }
- .ReceiptRecord-table{
- margin-top: 15px;
- }
- .ReceiptRecord-search .el-range-editor.el-input__inner{
- margin-bottom:0;
- }
- .warehousingaudit-search{
- display: flex;
- }
- .warehousingaudit-search-li label{
- margin-left: 10px;
- }
- .warehousingaudit-search .el-range-editor.el-input__inner{
- margin-bottom:0;
- }
- .warehousingaudit-table{
- margin-top: 15px;
- }
- .warehousingaudit-table .block{
- text-align: center;
- }
- </style>
|