123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097 |
- <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" 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="1100px" title="领用审核" :visible.sync="ApprovalVisible">
- <el-select @change="typevaluechange" style="width: 150px;margin-bottom: 10px;" size="small" v-model="typevalue" placeholder="请选择">
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- <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="250">
- <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.id,1)" >通过</el-button>
- <el-button v-if="scope.row.auditStatus==0" size="mini" type="info" title="不通过" @click="GoodsReceiveAudit(scope.row.id,2)">不通过</el-button>
- <el-button v-if="scope.row.auditStatus==1" size="mini" type="warning" title="取消通过" @click="GoodsReceiveAudit(scope.row.id,0)">取消通过</el-button>
- <el-button size="mini" title="删除" type="danger" @click="Deleteintolibraryreceives(scope.row)">删除</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-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-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-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:'',
-
- 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:[],
-
- 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.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("操作错误,联系信息部!");
- });
- },
-
- 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;
- },
-
- 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("操作错误,联系信息部!");
- });
- },
-
- 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.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:'',
- 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("操作错误,联系信息部!");
- });
- },
-
- 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 url = "/api/PersonnelModule/GoodsReceiveAudit"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' +that.token
- },
- data:{
- label:row+'',
- 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>
|