newWeighingManagement.vue 87 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418
  1. //检斤管理
  2. <template>
  3. <div class="center">
  4. <div class="substance">
  5. <div class="left">
  6. <BalanceAlert v-if="isShowBalance" ref="weightChild" :deptBudgetList="deptBudgetList" :information="information"
  7. v-on:balanceListen="setVal" class="zujian">
  8. </BalanceAlert>
  9. <div class="top">
  10. <div class="confirmWeight">
  11. <div class="titleWeight">确认重量</div>
  12. <div v-if="index == 0" class="weight">
  13. {{ weighingList.grossWeight }} <span class="kg-style">kg</span>
  14. </div>
  15. <div v-else class="weight">
  16. {{ weighingList.tare }} <span class="kg-style">kg</span>
  17. </div>
  18. </div>
  19. <div class="confirmInfo">
  20. <div class="car-type">车牌号</div>
  21. <div class="car-no">{{ carWeightInfo.carNumber }}</div>
  22. </div>
  23. </div>
  24. <div class="bottom">
  25. <div class="bg-left titleup"><span class="word_css">实时监控</span></div>
  26. <div v-if="!monitorUrl1" class="video1">
  27. <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
  28. <div>监控视频未连接</div>
  29. </div>
  30. <div v-else class="video1">
  31. <iframe :src="monitorUrl1" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
  32. mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
  33. </div>
  34. <div v-if="!monitorUrl2" class="video1">
  35. <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
  36. <div>监控视频未连接</div>
  37. </div>
  38. <div v-else class="video2">
  39. <iframe :src="monitorUrl2" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
  40. mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="right">
  45. <ws-form class="right-content">
  46. <div class="left1">
  47. <div class="titlesign weightTitle">
  48. <span class="word_css">检斤信息</span>
  49. </div>
  50. <div class="weightInfo">
  51. <div class="tab">
  52. <div :class="inWarehouseType == 1 ? 'in_css':'in_cssno'" @click="WarehousingType(1)">贸易入库</div>
  53. <div :class="inWarehouseType == 3 ? 'in_css':'in_cssno'" @click="WarehousingType(3)">收购入库</div>
  54. </div>
  55. <div class="tab weigh_btn">
  56. <el-badge :value="mListTop.length" class="badge_item">
  57. <div :class="tpyeNo == 1 ? 'in_css1':'in_cssno1'" @click="tabClick(0)">称毛重</div>
  58. </el-badge>
  59. <el-badge :value="pListTop.length" class="badge_item">
  60. <div :class="tpyeNo == 2 ? 'in_css1':'in_cssno1'" @click="tabClick(1)">称皮重</div>
  61. </el-badge>
  62. </div>
  63. <ws-info-table>
  64. <ws-form-item label="业务编号" span="1" prop="number">
  65. <ws-input v-model="weighingList.number" placeholder="自动获取,不可编辑" maxlength="100" disabled
  66. size="small" />
  67. </ws-form-item>
  68. <ws-form-item label="合同编号" span="1" prop="contractNo" v-show="inWarehouseType == 1"
  69. v-if="weighingList.contractNo">
  70. <ws-input v-model="weighingList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
  71. size="small" />
  72. </ws-form-item>
  73. <ws-form-item label="移库编号" span="1" prop="moveTaskNo" v-show="inWarehouseType == 1" v-else>
  74. <ws-input v-model="weighingList.moveTaskNo" placeholder="自动获取,不可编辑" maxlength="100" size="small"
  75. disabled />
  76. </ws-form-item>
  77. <ws-form-item label="客户" span="1" prop="customer" v-if="inWarehouseType == 3">
  78. <ws-input v-model="weighingList.customer" placeholder="自动获取,不可编辑" maxlength="100" disabled
  79. size="small" />
  80. </ws-form-item>
  81. <ws-form-item label="货名" span="1" prop="goodsName">
  82. <ws-input v-model="weighingList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled
  83. size="small" />
  84. </ws-form-item>
  85. <ws-form-item label="车牌号" span="1" prop="carNumber">
  86. <ws-input v-model="weighingList.carNumber" placeholder="自动获取,不可编辑" maxlength="100" size="small"
  87. disabled />
  88. </ws-form-item>
  89. <ws-form-item label="运输方式" span="1" prop="outType" v-if="inWarehouseType == 1">
  90. <ws-input v-model="weighingList.outType" placeholder="自动获取,不可编辑" maxlength="100" size="small"
  91. disabled />
  92. </ws-form-item>
  93. <ws-form-item label="箱号-1" span="1" prop="boxNo">
  94. <ws-input v-model="weighingList.boxNo" placeholder="自动获取,不可编辑" maxlength="20" size="small" disabled/>
  95. </ws-form-item>
  96. <ws-form-item label="封号-1" span="1" prop="titleNo">
  97. <ws-input v-model="weighingList.titleNo" placeholder="自动获取,不可编辑" maxlength="20" size="small" disabled/>
  98. </ws-form-item>
  99. <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
  100. <ws-input v-model="weighingList.boxNoOther" placeholder="自动获取,不可编辑" maxlength="20" size="small" disabled/>
  101. </ws-form-item>
  102. <ws-form-item label="封号-2" span="1" prop="titleNoOther">
  103. <ws-input v-model="weighingList.titleNoOther" placeholder="自动获取,不可编辑" maxlength="20" size="small" disabled />
  104. </ws-form-item>
  105. <ws-form-item label="毛重(KG)" span="1" prop="grossWeight">
  106. <ws-input type="number" @mousewheel.native.prevent v-if="index == 0"
  107. v-model="weighingList.grossWeight" @input="calculation(status)" placeholder="未获取到毛重" maxlength="100"
  108. size="small" :disabled="disabled" />
  109. <ws-input type="number" @mousewheel.native.prevent v-else v-model="weighingList.grossWeight"
  110. @input="calculation" placeholder="未获取到毛重" maxlength="100" size="small" disabled />
  111. <el-button class="butCss" @click="openPort" v-if="index == 0">重新获取</el-button>
  112. </ws-form-item>
  113. <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '皮重'">
  114. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare" @input="calculation"
  115. placeholder="未获取到皮重" maxlength="100" size="small" :disabled="disabled" />
  116. <el-button class="butCss" v-if="index != 0" @click="openPort">重新获取</el-button>
  117. </ws-form-item>
  118. <div class="formItem">
  119. <ws-form-item label="扣重(KG)" span="1" prop="buckleMiscellaneous"
  120. v-if="information == '皮重' && (paramType == '2' || inWarehouseType == 1)">
  121. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous"
  122. @input="calculation" placeholder="请输入扣重" maxlength="100" size="small" />
  123. </ws-form-item>
  124. <ws-form-item label="净重(KG)" span="1" prop="netWeight" v-if="information == '皮重'">
  125. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight"
  126. placeholder="自动计算,不可编辑" maxlength="100" size="small" disabled />
  127. </ws-form-item>
  128. <!-- <ws-form-item label="应收卸车过磅费(元)" span="1" prop="receivableWeighingFee" v-if="index == 1">
  129. <ws-input type="number" v-model="weighingList.receivableWeighingFee" placeholder="未获取到卸车过磅费金额"
  130. maxlength="100" size="small" disabled />
  131. </ws-form-item>
  132. <ws-form-item label="实收卸车过磅费(元)" span="1" prop="actualWeighingFee" v-if="index == 1">
  133. <ws-input type="number" v-model="weighingList.actualWeighingFee" placeholder="输入卸车过磅费" maxlength="100"
  134. size="small" />
  135. </ws-form-item> -->
  136. </div>
  137. </ws-info-table>
  138. <div class="but">
  139. <!-- <el-button @click="print" type="primary" :disabled="submitAllow">提交</el-button> -->
  140. <el-button @click="print" v-if="information == '毛重'" type="primary">保存</el-button>
  141. <el-button @click="print(1)" v-if="information == '皮重'" type="primary">保存并打印
  142. </el-button>
  143. </div>
  144. <!-- <div>
  145. <div>粮源</div>
  146. <div class='stocks' v-for='(item,index) in stocks'>
  147. <el-select v-model="item.warehouseName" filterable placeholder="选择所属仓库" @change="warehouseNameChange" :value="searchType">
  148. <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  149. style="color: #8890b1" />
  150. </el-select>
  151. <ws-input v-model="item.cost" placeholder="输入重量" maxlength="100"
  152. size="small" />
  153. <ws-input v-model="item.cost" placeholder="输入成本" maxlength="100"
  154. size="small" />
  155. <img class='add' @click='addstocks(index)' src="../../../public/img/add.png" alt="">
  156. <img class='del' @click='delstocks(index)' src="../../../public/img/del.png" alt="">
  157. </div>
  158. </div> -->
  159. </div>
  160. </div>
  161. <div class="car-right">
  162. <div class="screen">
  163. <el-select v-model="warehouseName" placeholder="请选择仓库名" @change="warehouseNameChange">
  164. <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"
  165. :value="item.warehouseName">
  166. </el-option>
  167. </el-select>
  168. <el-button @click='refreshClick(1)' type="primary">刷新</el-button>
  169. <el-button @click='refreshClick' type="primary">{{timer?refresh:'自动刷新'}}</el-button>
  170. <!-- <el-checkbox v-model="checked">默认</el-checkbox> -->
  171. </div>
  172. <div class="screen frame">
  173. <div class="screen_left">
  174. <div @click="cutstatus(1)" :class="status==1?'select_css':'noselect_css'"
  175. v-if="!(inWarehouseType == 1 && tpyeNo == 2)">未称{{information}}</div>
  176. <div @click="cutstatus(2)" :class="status==2?'select_css':'noselect_css'"
  177. v-if="!(inWarehouseType == 1 && tpyeNo == 2)">已称{{information}}</div>
  178. </div>
  179. <div class="screen_right">
  180. <div @click="record" v-hasPermission="`acquisitionManagement.acquisitionWeight.view`" class="jilu">记录
  181. </div>
  182. </div>
  183. </div>
  184. <el-table ref="singleTable" :data="carList" highlight-current-row @current-change="handleCurrentChange"
  185. style="width: 100%; overflow-y: scroll !important;; height: calc(100vh - 54vh);margin-top:20px">
  186. <el-table-column property="number" label="业务编号">
  187. </el-table-column>
  188. <el-table-column property="carNumber" label="车牌号">
  189. </el-table-column>
  190. <el-table-column property="status" label="状态">
  191. </el-table-column>
  192. </el-table>
  193. <div style="text-align: center">
  194. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  195. :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
  196. :total="deptBudgetTotal">
  197. </el-pagination>
  198. </div>
  199. <!-- <div class="table-title">
  200. <div class="top">
  201. <div class="top-item first"></div>
  202. <div class="top-item">编号</div>
  203. <div class="top-item">车牌号</div>
  204. </div>
  205. <div class="top">
  206. <div></div>
  207. <div class="top-item"></div>
  208. <div class="top-item">编号</div>
  209. <div class="top-item">车牌号</div>
  210. </div>
  211. </div>
  212. <div class="table">
  213. <div class="table-content" v-for="(item,index) in 30" :key="index">
  214. <div class="table-content-item"><input type="radio"></div>
  215. <div class="table-content-item">xxxxxxxxxxxxx</div>
  216. <div class="table-content-item">辽A11111</div>
  217. </div>
  218. </div> -->
  219. </div>
  220. </ws-form>
  221. </div>
  222. </div>
  223. <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单" @opened="opendBtn"
  224. @close="closeDialog" :close-on-click-modal="false">
  225. <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
  226. <div style="text-align: center">
  227. <el-button type="primary" @click="closePrint">关闭</el-button>
  228. <el-button type="primary" @click="printSmall">打印小票</el-button>
  229. <el-button type="primary" @click="printBig">打印单据</el-button>
  230. </div>
  231. </el-dialog>
  232. <div class="mask" v-show="isShowPrintType"></div>
  233. <div class="print-type" v-show="isShowPrintType">
  234. <div class="print-type-content">
  235. <div class="print-type-title">请选择打印类型</div>
  236. <div class="print-type-checkbox">
  237. <!-- <el-radio-group v-model="radio">
  238. <el-radio label="A4" class="label-width" @change="selectType">A4</el-radio>
  239. <el-radio label="A5" class="label-width" @change="selectType">A5</el-radio>
  240. </el-radio-group> -->
  241. </div>
  242. <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
  243. <div>收货单位:</div>
  244. <!-- <div>{{companyName}}</div> -->
  245. <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
  246. <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
  247. </el-option>
  248. </el-select>
  249. </div>
  250. <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
  251. <div class="print-type-ew">
  252. <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
  253. <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
  254. </div>
  255. <div class="ew-print" v-if="printSeparately">
  256. <div class="row">
  257. <div>额外客户姓名:</div>
  258. <!-- <div>{{companyName}}</div> -->
  259. <el-select v-model="ewCustomer" placeholder="请选择" style="width: 75%;">
  260. <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
  261. </el-option>
  262. </el-select>
  263. </div>
  264. <div class="row">
  265. <div>额外收货单位:</div>
  266. <!-- <div>{{companyNameEW}}</div> -->
  267. <el-select v-model="companyNameEW" placeholder="请选择" style="width: 75%;">
  268. <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
  269. :value="item.value">
  270. </el-option>
  271. </el-select>
  272. </div>
  273. </div>
  274. </div>
  275. </div>
  276. <div class="bottom-btn">
  277. <el-button @click="typePrintClick">确定</el-button>
  278. <el-button @click="typePrintCannelClick">取消</el-button>
  279. </div>
  280. </div>
  281. </div>
  282. </template>
  283. <script>
  284. import {
  285. tare,
  286. grossWeight,
  287. getamount,
  288. getPrint,
  289. getweighingList,
  290. getinspectLookGoods,
  291. selectWarehouseSelf,
  292. getsettleaccout,
  293. newSubmit
  294. } from '@/model/houseSelfCollect/index'
  295. import {
  296. addstorageputList
  297. } from '@/model/warehouse/index'
  298. import weightCheckPrint from './component/weightCheckPrint.vue'
  299. import BalanceAlert from '@/components/balanceAlert'
  300. import html2canvas from 'html2canvas'
  301. import axios from 'axios'
  302. export default {
  303. components: {
  304. weightCheckPrint,
  305. BalanceAlert,
  306. },
  307. watch: {
  308. '$route'(to, from) {
  309. if (to.name == 'newWeighingManagement') {
  310. this.isShowBalance = true
  311. var _saomaData = JSON.parse(localStorage.getItem('saoma_data')) //判断是否扫码进来的
  312. // }
  313. //仓库
  314. selectWarehouseSelf({
  315. compId: localStorage.getItem('ws-pf_compId'),
  316. })
  317. .toPromise()
  318. .then((response) => {
  319. this.warehouseList = response
  320. if (_saomaData) { //缓存中有值,证明扫码进来的
  321. this.warehouseName = _saomaData.warehouseName
  322. this.cangid = _saomaData.cangid
  323. this.monitorUrl1 = _saomaData.monitorUrl1
  324. this.monitorUrl2 = _saomaData.monitorUrl2
  325. this.allowEdit = _saomaData.allowEdit
  326. this.id = _saomaData.id
  327. this.tpyeNo = _saomaData.typeNo
  328. if (_saomaData.managementType) {
  329. this.inWarehouseType = _saomaData.managementType
  330. }
  331. localStorage.removeItem('saoma_data'); //第一次进来结束后清除缓存
  332. } else if (localStorage.getItem('houseSelfCollect_house1')) {
  333. this.warehouseName = JSON.parse(localStorage.getItem('houseSelfCollect_house1')).value
  334. for (var i = 0; i < response.length; i++) {
  335. if (this.warehouseName == this.warehouseList[i].warehouseName) {
  336. this.cangid = this.warehouseList[i].id
  337. this.monitorUrl1 = this.warehouseList[i].monitorUrl1
  338. this.monitorUrl2 = this.warehouseList[i].monitorUrl2
  339. this.allowEdit = this.warehouseList[i].allowEdit
  340. break
  341. }
  342. }
  343. } else {
  344. localStorage.setItem('houseSelfCollect_house1', JSON.stringify({
  345. value: this.warehouseList[0].warehouseName,
  346. warehouseId: this.warehouseList[0].id,
  347. count: this.warehouseList[0].count,
  348. No: this.warehouseList[0].commonWarehouseNo,
  349. allowEdit: this.warehouseList[0].allowEdit,
  350. compId: localStorage.getItem('ws-pf_compId')
  351. }))
  352. this.warehouseName = this.warehouseList[0].warehouseName
  353. localStorage.setItem('ck', this.warehouseName)
  354. this.cangid = this.warehouseList[0].id
  355. this.allowEdit = this.warehouseList[0].allowEdit
  356. this.monitorUrl1 = this.warehouseList[0].monitorUrl1
  357. this.monitorUrl2 = this.warehouseList[0].monitorUrl2
  358. }
  359. this.deptBudgetList.warehouseName = this.warehouseName
  360. if (this.allowEdit == 0) {
  361. this.disabled = true
  362. } else if (this.allowEdit == 1) {
  363. this.disabled = false
  364. }
  365. if (this.tpyeNo == 1) {
  366. this.information = '毛重'
  367. this.weighingList.tare = 0
  368. } else if (this.tpyeNo == 2) {
  369. this.information = '皮重'
  370. }
  371. this.getList()
  372. })
  373. }
  374. },
  375. weighingList: {
  376. //深度监听,可监听到对象、数组的变化
  377. handler(val, oldVal) {
  378. if (val.tare) {
  379. if (this.weighingList.buckleMiscellaneous) {
  380. this.weighingList.netWeight =
  381. this.weighingList.grossWeight -
  382. val.tare -
  383. this.weighingList.buckleMiscellaneous
  384. } else {
  385. this.weighingList.netWeight =
  386. this.weighingList.grossWeight - val.tare
  387. }
  388. }
  389. },
  390. deep: true, //true 深度监听
  391. }
  392. },
  393. data() {
  394. return {
  395. timer: '',
  396. refresh: 60,
  397. isShowBalance: false,
  398. currentPage: 1,
  399. pageSize: 50,
  400. deptCircularPage: {},
  401. deptBudgetTotal: 0,
  402. pList: [],
  403. mList: [],
  404. index: 0,
  405. status: 1,
  406. carList: [],
  407. carWeightInfo: {
  408. carNumber: '',
  409. type: '',
  410. weight: '',
  411. },
  412. currentRow: null,
  413. inspect: {},
  414. types: 1,
  415. information: '',
  416. weighingList: {
  417. grossWeight: '',
  418. tare: '',
  419. buckleMiscellaneous: 0,
  420. netWeight: 0,
  421. receivableWeighingFee: '',
  422. qualityInspectionManagement: {
  423. boxNo: '暂无',
  424. boxNoOther: '暂无',
  425. titleNo: '暂无',
  426. titleNoOther: '暂无',
  427. }
  428. },
  429. deptBudgetList: {},
  430. tpyeNo: '1',
  431. disabled: true,
  432. relationId: '',
  433. // warehouseId: '',
  434. purchasePriceList: [],
  435. isShowPrint: false,
  436. tableData: {},
  437. reader: null,
  438. param: 9600,
  439. monitorUrl1: '', //监控地址
  440. monitorUrl2: '', //监控地址
  441. cangid: '',
  442. paramType: '1', //参数类型 1 扣重比 2 降幅
  443. warehouseName: '',
  444. result1: '00',
  445. allowEdit: 0,
  446. mListTop: [],
  447. mListBottom: [],
  448. stocks: [{
  449. warehouseName: '',
  450. weight: '',
  451. cost: ''
  452. }],
  453. pListTop: [],
  454. carList1: [],
  455. pListBottom: [],
  456. warehouseList: [], //仓库
  457. checked: false,
  458. inWarehouseType: 1, //入库类型
  459. mListTotal: [],
  460. pListTotal: [],
  461. submitAllow: false,
  462. id: '',
  463. inOutData: {},
  464. idPrint: '',
  465. ewCustomerOptions: [{
  466. value: '黑龙江利润元粮食贸易有限公司',
  467. label: '黑龙江利润元粮食贸易有限公司'
  468. }, {
  469. value: '黑龙江众利合粮食贸易有限公司',
  470. label: '黑龙江众利合粮食贸易有限公司'
  471. }, {
  472. value: '黑龙江鑫满仓粮食贸易有限公司',
  473. label: '黑龙江鑫满仓粮食贸易有限公司'
  474. }, {
  475. value: '黑龙江中天昊元贸易有限公司',
  476. label: '黑龙江中天昊元贸易有限公司'
  477. }],
  478. companyNameOptions: [{
  479. value: '黑龙江利润元粮食贸易有限公司',
  480. label: '黑龙江利润元粮食贸易有限公司'
  481. }, {
  482. value: '黑龙江众利合粮食贸易有限公司',
  483. label: '黑龙江众利合粮食贸易有限公司'
  484. }, {
  485. value: '黑龙江鑫满仓粮食贸易有限公司',
  486. label: '黑龙江鑫满仓粮食贸易有限公司'
  487. }, {
  488. value: '黑龙江中天昊元贸易有限公司',
  489. label: '黑龙江中天昊元贸易有限公司'
  490. }, ],
  491. companyNameEWOptions: [{
  492. value: '厦门建发物产有限公司',
  493. label: '厦门建发物产有限公司'
  494. }],
  495. companyName: '黑龙江利润元粮食贸易有限公司',
  496. companyNameEW: '厦门建发物产有限公司',
  497. ewCustomer: '黑龙江利润元粮食贸易有限公司',
  498. ewradio: '',
  499. ddchecked: false,
  500. checked: false,
  501. isShowPrintType: false,
  502. dialogDataList: [],
  503. statusType: 1,
  504. jjSelectPrintList: [],
  505. printSeparately: false,
  506. }
  507. },
  508. beforeDestroy() {
  509. if (this.timer) { //如果定时器还在运行 或者直接关闭,不用判断
  510. clearInterval(this.timer); //关闭
  511. }
  512. },
  513. mounted() {
  514. this.isShowBalance = true
  515. var _saomaData = JSON.parse(localStorage.getItem('saoma_data')) //判断是否扫码进来的
  516. // }
  517. //仓库
  518. selectWarehouseSelf({
  519. compId: localStorage.getItem('ws-pf_compId'),
  520. })
  521. .toPromise()
  522. .then((response) => {
  523. this.warehouseList = response
  524. if (_saomaData) { //缓存中有值,证明扫码进来的
  525. this.warehouseName = _saomaData.warehouseName
  526. this.cangid = _saomaData.cangid
  527. this.monitorUrl1 = _saomaData.monitorUrl1
  528. this.monitorUrl2 = _saomaData.monitorUrl2
  529. this.allowEdit = _saomaData.allowEdit
  530. this.id = _saomaData.id
  531. this.tpyeNo = _saomaData.typeNo
  532. if (_saomaData.managementType) {
  533. this.inWarehouseType = _saomaData.managementType
  534. }
  535. localStorage.removeItem('saoma_data'); //第一次进来结束后清除缓存
  536. } else if (localStorage.getItem('houseSelfCollect_house1')) {
  537. this.warehouseName = JSON.parse(localStorage.getItem('houseSelfCollect_house1')).value
  538. for (var i = 0; i < response.length; i++) {
  539. if (this.warehouseName == this.warehouseList[i].warehouseName) {
  540. this.cangid = this.warehouseList[i].id
  541. this.monitorUrl1 = this.warehouseList[i].monitorUrl1
  542. this.monitorUrl2 = this.warehouseList[i].monitorUrl2
  543. this.allowEdit = this.warehouseList[i].allowEdit
  544. break
  545. }
  546. }
  547. } else {
  548. localStorage.setItem('houseSelfCollect_house1', JSON.stringify({
  549. value: this.warehouseList[0].warehouseName,
  550. warehouseId: this.warehouseList[0].id,
  551. count: this.warehouseList[0].count,
  552. No: this.warehouseList[0].commonWarehouseNo,
  553. allowEdit: this.warehouseList[0].allowEdit,
  554. compId: localStorage.getItem('ws-pf_compId')
  555. }))
  556. this.warehouseName = this.warehouseList[0].warehouseName
  557. localStorage.setItem('ck', this.warehouseName)
  558. this.cangid = this.warehouseList[0].id
  559. this.allowEdit = this.warehouseList[0].allowEdit
  560. this.monitorUrl1 = this.warehouseList[0].monitorUrl1
  561. this.monitorUrl2 = this.warehouseList[0].monitorUrl2
  562. }
  563. this.deptBudgetList.warehouseName = this.warehouseName
  564. if (this.allowEdit == 0) {
  565. this.disabled = true
  566. } else if (this.allowEdit == 1) {
  567. this.disabled = false
  568. }
  569. if (this.tpyeNo == 1) {
  570. this.information = '毛重'
  571. this.weighingList.tare = ''
  572. } else if (this.tpyeNo == 2) {
  573. this.information = '皮重'
  574. }
  575. this.getList()
  576. })
  577. },
  578. activated() {
  579. // if (!this.$route.query.grossWeight) {
  580. // this.$route.query.grossWeight = 0
  581. // } else {
  582. // this.weighingList.grossWeight = this.$route.query.grossWeight
  583. // }
  584. // this.allowEdit = this.$route.query.allowEdit
  585. // this.$route.query.automaticWeightAcquisition = 0
  586. // if(this.$route.query.automaticWeightAcquisition == '1'){
  587. // this.openPort()
  588. // this.isShowBalance = true
  589. // }
  590. // if (this.$route.query.automaticWeightAcquisition == '1') {
  591. },
  592. methods: {
  593. refreshClick(type) {
  594. let that = this
  595. if (type == 1) {
  596. getweighingList({
  597. compId: localStorage.getItem('ws-pf_compId'),
  598. currentPage: that.currentPage,
  599. pageSize: that.pageSize,
  600. searchKeyWord: '',
  601. warehouseName: that.warehouseName,
  602. managementType: 1,
  603. serviceManagementType: that.inWarehouseType,
  604. loadingstatus: 1,
  605. // statusType:1
  606. })
  607. .toPromise()
  608. .then((response) => {
  609. that.common.commonWeighingList = response.records
  610. that.makeData()
  611. getweighingList({
  612. compId: localStorage.getItem('ws-pf_compId'),
  613. currentPage: that.currentPage,
  614. pageSize: that.pageSize,
  615. searchKeyWord: '',
  616. statusType: that.statusType,
  617. warehouseName: that.warehouseName,
  618. managementType: 1,
  619. serviceManagementType: that.inWarehouseType,
  620. loadingstatus: 1,
  621. // statusType:1
  622. })
  623. .toPromise()
  624. .then((response) => {
  625. that.deptBudgetTotal = response.total
  626. // that.weighingList = response.records
  627. })
  628. .catch((response) => {
  629. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  630. })
  631. })
  632. .catch((response) => {
  633. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  634. })
  635. } else {
  636. clearInterval(that.timer)
  637. that.refresh = 60
  638. that.timer = setInterval(function() {
  639. // console.log(that.refresh)
  640. if (that.refresh == 0) {
  641. that.refresh = 60
  642. getweighingList({
  643. compId: localStorage.getItem('ws-pf_compId'),
  644. currentPage: that.currentPage,
  645. pageSize: that.pageSize,
  646. searchKeyWord: '',
  647. warehouseName: that.warehouseName,
  648. managementType: 1,
  649. serviceManagementType: that.inWarehouseType,
  650. loadingstatus: 1,
  651. // statusType:1
  652. })
  653. .toPromise()
  654. .then((response) => {
  655. that.common.commonWeighingList = response.records
  656. that.makeData()
  657. getweighingList({
  658. compId: localStorage.getItem('ws-pf_compId'),
  659. currentPage: that.currentPage,
  660. pageSize: that.pageSize,
  661. searchKeyWord: '',
  662. statusType: that.statusType,
  663. warehouseName: that.warehouseName,
  664. managementType: 1,
  665. serviceManagementType: that.inWarehouseType,
  666. loadingstatus: 1,
  667. // statusType:1
  668. })
  669. .toPromise()
  670. .then((response) => {
  671. that.deptBudgetTotal = response.total
  672. // that.weighingList = response.records
  673. })
  674. .catch((response) => {
  675. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  676. })
  677. })
  678. .catch((response) => {
  679. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  680. })
  681. }
  682. that.refresh--
  683. }, 1000);
  684. }
  685. },
  686. changeEw(e) {
  687. this.ddchecked = false
  688. if (e) {
  689. this.printSeparately = true
  690. } else {
  691. this.printSeparately = false
  692. }
  693. },
  694. changeEwDD(e) {
  695. this.checked = false
  696. if (e) {
  697. this.printSeparately = true
  698. } else {
  699. this.printSeparately = false
  700. }
  701. },
  702. typePrintCannelClick() {
  703. this.ddchecked = false,
  704. this.checked = false,
  705. this.dialogDataList = [] //打个打印取消时数组至空
  706. this.isShowPrintType = false
  707. },
  708. async typePrintClick(type) {
  709. getPrint({
  710. id: this.idPrint
  711. })
  712. .toPromise()
  713. .then((response) => {
  714. this.dialogDataList = [] //点击确认时先清空要打印的数组
  715. this.dialogData = response
  716. if (response.compName == '黑龙江秋收有限公司') {
  717. this.dialogData.compName = '黑龙江中天昊元贸易有限公司'
  718. }
  719. if (this.checked) {
  720. this.dialogDataList.push(this.dialogData)
  721. var _datas = JSON.stringify(this.dialogData)
  722. _datas = JSON.parse(_datas)
  723. _datas.compName = this.companyNameEW;
  724. _datas.customer = this.ewCustomer
  725. this.dialogDataList.push(_datas)
  726. } else if (this.ddchecked) {
  727. _datas = this.dialogData
  728. _datas.compName = this.companyNameEW;
  729. _datas.customer = this.ewCustomer
  730. this.dialogDataList.push(_datas)
  731. } else {
  732. this.dialogData.compName = this.companyName
  733. this.dialogDataList.push(this.dialogData)
  734. }
  735. window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.dialogDataList).replace(/%/g, 'baifenhao'))
  736. // this.printBig("", this.radio)
  737. })
  738. .catch((response) => {})
  739. },
  740. warehouseNameChange() {
  741. localStorage.setItem('ck', this.warehouseName)
  742. this.weighingList.warehouseName = this.warehouseName
  743. this.deptBudgetList.warehouseName = this.warehouseName
  744. for (var i = 0; i < this.warehouseList.length; i++) {
  745. if (this.warehouseName == this.warehouseList[i].warehouseName) {
  746. localStorage.setItem('houseSelfCollect_house1', JSON.stringify({
  747. value: this.warehouseList[i].warehouseName,
  748. warehouseId: this.warehouseList[i].id,
  749. count: this.warehouseList[i].count,
  750. No: this.warehouseList[i].commonWarehouseNo,
  751. allowEdit: this.warehouseList[i].allowEdit,
  752. compId: localStorage.getItem('ws-pf_compId')
  753. }))
  754. this.cangid = this.warehouseList[i].id
  755. this.monitorUrl1 = this.warehouseList[i].monitorUrl1
  756. this.monitorUrl2 = this.warehouseList[i].monitorUrl2
  757. this.allowEdit = this.warehouseList[i].allowEdit
  758. if (this.allowEdit == 0) {
  759. this.disabled = true
  760. } else if (this.allowEdit == 1) {
  761. this.disabled = false
  762. }
  763. }
  764. }
  765. this.getList()
  766. },
  767. record() {
  768. this.$router.push({
  769. path: 'weightCheckRecord',
  770. query: {
  771. inWarehouseType: this.inWarehouseType,
  772. warehouseName: this.warehouseName
  773. }
  774. })
  775. },
  776. WarehousingType(num) {
  777. this.inWarehouseType = num
  778. if (this.inWarehouseType == 1 && this.status == 2) {
  779. this.status = 1
  780. }
  781. this.getList()
  782. },
  783. setVal(data) {
  784. if (this.information == '毛重') {
  785. this.weighingList.grossWeight = data
  786. } else {
  787. this.weighingList.tare = data
  788. }
  789. },
  790. openPort() {
  791. this.$refs.weightChild.openPort()
  792. },
  793. cutstatus(status) {
  794. this.status = status
  795. if (status == 2) {
  796. if (this.tpyeNo == 1) {
  797. this.statusType = 1
  798. this.getList()
  799. // this.carList = this.carList1.filter(function(item) {
  800. // return item.status == '已称毛重'
  801. // })
  802. } else {
  803. this.statusType = 3
  804. this.getList()
  805. // this.carList = this.carList1.filter(function(item) {
  806. // return item.status == '已称皮重'
  807. // })
  808. }
  809. } else {
  810. if (this.tpyeNo == 1) {
  811. this.statusType = 1
  812. this.getList()
  813. // this.mListTop.concat(this.mListBottom)
  814. // this.carList = this.carList1.filter(function(item) {
  815. // return item.status == '已质检'
  816. // })
  817. } else {
  818. this.statusType = 2
  819. this.getList()
  820. // this.carList = this.carList1.filter(function(item) {
  821. // return item.status == '已称毛重'
  822. // })
  823. }
  824. }
  825. // this.deptBudgetTotal = this.carList.length
  826. },
  827. addstocks(index) {
  828. this.stocks.push({
  829. warehouseName: '',
  830. cost: ''
  831. })
  832. },
  833. delstocks(index) {
  834. this.stocks.splice(index, 1)
  835. },
  836. handleSizeChange(val) {
  837. console.log(`每页 ${val} 条`)
  838. this.pageSize = val
  839. this.getList()
  840. },
  841. getList() {
  842. // 货名
  843. getinspectLookGoods({
  844. warehouseId: this.cangid,
  845. }).toPromise()
  846. .then((response) => {
  847. this.purchasePriceList = response
  848. })
  849. this.refreshClick(1)
  850. // getweighingList({
  851. // compId: localStorage.getItem('ws-pf_compId'),
  852. // currentPage: this.currentPage,
  853. // pageSize: this.pageSize,
  854. // searchKeyWord: '',
  855. // warehouseName: this.warehouseName,
  856. // managementType: 1,
  857. // serviceManagementType: this.inWarehouseType,
  858. // // statusType:1
  859. // })
  860. // .toPromise()
  861. // .then((response) => {
  862. // this.common.commonWeighingList = response.records
  863. // this.makeData()
  864. // })
  865. // .catch((response) => {
  866. // // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  867. // })
  868. // getweighingList({
  869. // compId: localStorage.getItem('ws-pf_compId'),
  870. // currentPage: this.currentPage,
  871. // pageSize: this.pageSize,
  872. // searchKeyWord: '',
  873. // statusType: this.statusType,
  874. // warehouseName: this.warehouseName,
  875. // managementType: 1,
  876. // serviceManagementType: this.inWarehouseType,
  877. // // statusType:1
  878. // })
  879. // .toPromise()
  880. // .then((response) => {
  881. // this.deptBudgetTotal = response.total
  882. // this.weighingList = response.records
  883. // })
  884. // .catch((response) => {
  885. // // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  886. // })
  887. },
  888. makeData() {
  889. this.mList = []
  890. this.pList = []
  891. this.mListTop = []
  892. this.mListBottom = []
  893. this.pListTop = []
  894. this.pListBottom = []
  895. this.carWeightInfo.carNumber = ''
  896. let that = this
  897. let _list = this.common.commonWeighingList
  898. if(_list.length > 0 ){
  899. this.weighingList = []
  900. }
  901. for (let i = 0; i < _list.length; i++) {
  902. if (_list[i].paymentManagement) {
  903. if (
  904. _list[i].paymentManagement.status != '待结算' ||
  905. _list[i].paymentManagement.approveStatus
  906. ) {
  907. continue
  908. }
  909. }
  910. if (_list[i].status == '已质检') {
  911. this.mListTop.push(_list[i])
  912. }
  913. if (_list[i].status == '已称毛重') {
  914. this.mListBottom.push(_list[i])
  915. }
  916. if (_list[i].status == '已称皮重') {
  917. this.pListBottom.push(_list[i])
  918. }
  919. if (_list[i].status == '已称毛重') {
  920. this.pListTop.push(_list[i])
  921. }
  922. }
  923. if (this.status == 1) {
  924. this.mList = this.mListTop
  925. this.pList = this.pListTop
  926. } else {
  927. this.mList = this.mListBottom
  928. this.pList = this.pListBottom
  929. }
  930. this.mListTotal = this.mListTop.concat(this.mListBottom)
  931. this.pListTotal = this.pListTop.concat(this.pListBottom)
  932. if (this.information == '毛重') {
  933. this.index = 0
  934. console.log(this.mList)
  935. this.carList = this.mList
  936. this.carList1 = this.mListTotal
  937. if (this.mList.length != 0) {
  938. this.setCurrent(this.mList[0])
  939. this.weighingList = this.mList[0]
  940. this.carWeightInfo = {
  941. carNumber: this.mList[0].carNumber,
  942. type: this.information,
  943. weight: this.weighingList.grossWeight,
  944. }
  945. }
  946. } else {
  947. this.index = 1
  948. console.log(this.pList)
  949. this.carList = this.pList
  950. this.carList1 = this.pListTotal
  951. if (this.pList.length != 0) {
  952. this.setCurrent(this.pList[0])
  953. this.weighingList = this.pList[0]
  954. this.weighingList.inOutType = this.pList[0].qualityInspectionManagement.inOutType
  955. this.weighingList.inOutTypeKey = this.pList[0].qualityInspectionManagement.inOutTypeKey
  956. this.weighingList.deductionAmount = this.pList[0].qualityInspectionManagement.deductionAmount
  957. // console.log(this.weighingList)
  958. this.carWeightInfo = {
  959. carNumber: this.pList[0].carNumber,
  960. type: this.information,
  961. weight: this.weighingList.tare
  962. }
  963. }
  964. this.deptBudgetTotal = this.pList.length
  965. }
  966. this.weighingList.carModel = this.weighingList.qualityInspectionManagement.carModel
  967. //已下代码注释保留
  968. // if (this.weighingList.carModel == '单拖小柜') {
  969. // this.weighingList.receivableWeighingFee = 80
  970. // this.weighingList.actualWeighingFee = 80
  971. // } else if (this.weighingList.carModel == '双拖小柜') {
  972. // this.weighingList.receivableWeighingFee = 160
  973. // this.weighingList.actualWeighingFee = 160
  974. // } else if (this.weighingList.carModel == '大柜') {
  975. // if (this.weighingList.grossWeight / 1000 < 50) {
  976. // this.$set(this.weighingList, 'receivableWeighingFee', 120)
  977. // this.weighingList.actualWeighingFee = 120
  978. // this.$forceUpdate()
  979. // } else if (
  980. // this.weighingList.grossWeight / 1000 > 50 ||
  981. // this.weighingList.grossWeight / 1000 < 65
  982. // ) {
  983. // this.weighingList.receivableWeighingFee = 150
  984. // this.weighingList.actualWeighingFee = 150
  985. // } else if (
  986. // this.weighingList.grossWeight / 1000 > 65 ||
  987. // this.weighingList.grossWeight / 1000 < 75
  988. // ) {
  989. // this.weighingList.receivableWeighingFee = 170
  990. // this.weighingList.actualWeighingFee = 170
  991. // } else if (
  992. // this.weighingList.grossWeight / 1000 > 75 ||
  993. // this.weighingList.grossWeight / 1000 < 80
  994. // ) {
  995. // this.weighingList.receivableWeighingFee = 190
  996. // this.weighingList.actualWeighingFee = 190
  997. // } else if (
  998. // this.weighingList.grossWeight / 1000 > 80 ||
  999. // this.weighingList.grossWeight / 1000 < 85
  1000. // ) {
  1001. // this.weighingList.receivableWeighingFee = 210
  1002. // this.weighingList.actualWeighingFee = 210
  1003. // } else if (
  1004. // this.weighingList.grossWeight / 1000 > 85 ||
  1005. // this.weighingList.grossWeight / 1000 < 95
  1006. // ) {
  1007. // this.weighingList.receivableWeighingFee = 240
  1008. // this.weighingList.actualWeighingFee = 240
  1009. // } else if (
  1010. // this.weighingList.grossWeight / 1000 > 95 ||
  1011. // this.weighingList.grossWeight / 1000 < 105
  1012. // ) {
  1013. // this.weighingList.receivableWeighingFee = 260
  1014. // this.weighingList.actualWeighingFee = 260
  1015. // } else if (
  1016. // this.weighingList.grossWeight / 1000 > 105 ||
  1017. // this.weighingList.grossWeight / 1000 < 150
  1018. // ) {
  1019. // this.weighingList.receivableWeighingFee = 300
  1020. // this.weighingList.actualWeighingFee = 300
  1021. // }
  1022. // } else if (this.weighingList.carModel == '挂车') {
  1023. // if (this.weighingList.grossWeight / 1000 < 50) {
  1024. // this.weighingList.receivableWeighingFee = 180
  1025. // this.weighingList.actualWeighingFee = 180
  1026. // } else if (
  1027. // this.weighingList.grossWeight / 1000 > 50 ||
  1028. // this.weighingList.grossWeight / 1000 < 65
  1029. // ) {
  1030. // this.weighingList.receivableWeighingFee = 200
  1031. // this.weighingList.actualWeighingFee = 200
  1032. // } else if (
  1033. // this.weighingList.grossWeight / 1000 > 65 ||
  1034. // this.weighingList.grossWeight / 1000 < 75
  1035. // ) {
  1036. // this.weighingList.receivableWeighingFee = 250
  1037. // this.weighingList.actualWeighingFee = 250
  1038. // } else if (
  1039. // this.weighingList.grossWeight / 1000 > 75 ||
  1040. // this.weighingList.grossWeight / 1000 < 85
  1041. // ) {
  1042. // this.weighingList.receivableWeighingFee = 350
  1043. // this.weighingList.actualWeighingFee = 350
  1044. // } else if (
  1045. // this.weighingList.grossWeight / 1000 > 85 ||
  1046. // this.weighingList.grossWeight / 1000 < 95
  1047. // ) {
  1048. // this.weighingList.receivableWeighingFee = 400
  1049. // this.weighingList.actualWeighingFee = 400
  1050. // } else if (
  1051. // this.weighingList.grossWeight / 1000 > 95 ||
  1052. // this.weighingList.grossWeight / 1000 < 105
  1053. // ) {
  1054. // this.weighingList.receivableWeighingFee = 450
  1055. // this.weighingList.actualWeighingFee = 450
  1056. // } else if (
  1057. // this.weighingList.grossWeight / 1000 > 105 ||
  1058. // this.weighingList.grossWeight / 1000 < 120
  1059. // ) {
  1060. // this.weighingList.receivableWeighingFee = 500
  1061. // this.weighingList.actualWeighingFee = 500
  1062. // } else if (
  1063. // this.weighingList.grossWeight / 1000 > 120 ||
  1064. // this.weighingList.grossWeight / 1000 < 130
  1065. // ) {
  1066. // this.weighingList.receivableWeighingFee = 550
  1067. // this.weighingList.actualWeighingFee = 550
  1068. // } else if (
  1069. // this.weighingList.grossWeight / 1000 > 130 ||
  1070. // this.weighingList.grossWeight / 1000 < 150
  1071. // ) {
  1072. // this.weighingList.receivableWeighingFee = 700
  1073. // this.weighingList.actualWeighingFee = 700
  1074. // }
  1075. // } else if (this.weighingList.carModel == '冷藏箱(不抠箱)') {
  1076. // if (this.weighingList.grossWeight / 1000 < 50) {
  1077. // this.weighingList.receivableWeighingFee = 120
  1078. // this.weighingList.actualWeighingFee = 120
  1079. // } else if (
  1080. // this.weighingList.grossWeight / 1000 > 50 ||
  1081. // this.weighingList.grossWeight / 1000 < 65
  1082. // ) {
  1083. // this.weighingList.receivableWeighingFee = 150
  1084. // this.weighingList.actualWeighingFee = 150
  1085. // } else if (
  1086. // this.weighingList.grossWeight / 1000 > 65 ||
  1087. // this.weighingList.grossWeight / 1000 < 75
  1088. // ) {
  1089. // this.weighingList.receivableWeighingFee = 170
  1090. // this.weighingList.actualWeighingFee = 170
  1091. // } else if (
  1092. // this.weighingList.grossWeight / 1000 > 75 ||
  1093. // this.weighingList.grossWeight / 1000 < 80
  1094. // ) {
  1095. // this.weighingList.receivableWeighingFee = 190
  1096. // this.weighingList.actualWeighingFee = 190
  1097. // } else if (
  1098. // this.weighingList.grossWeight / 1000 > 80 ||
  1099. // this.weighingList.grossWeight / 1000 < 85
  1100. // ) {
  1101. // this.weighingList.receivableWeighingFee = 210
  1102. // this.weighingList.actualWeighingFee = 210
  1103. // } else if (
  1104. // this.weighingList.grossWeight / 1000 > 85 ||
  1105. // this.weighingList.grossWeight / 1000 < 95
  1106. // ) {
  1107. // this.weighingList.receivableWeighingFee = 240
  1108. // this.weighingList.actualWeighingFee = 240
  1109. // } else if (
  1110. // this.weighingList.grossWeight / 1000 > 95 ||
  1111. // this.weighingList.grossWeight / 1000 < 105
  1112. // ) {
  1113. // this.weighingList.receivableWeighingFee = 260
  1114. // this.weighingList.actualWeighingFee = 260
  1115. // } else if (
  1116. // this.weighingList.grossWeight / 1000 > 105 ||
  1117. // this.weighingList.grossWeight / 1000 < 120
  1118. // ) {
  1119. // this.weighingList.receivableWeighingFee = 300
  1120. // this.weighingList.actualWeighingFee = 300
  1121. // }
  1122. // } else if (this.weighingList.carModel == '冷藏箱(抠箱)') {
  1123. // if (this.weighingList.grossWeight / 1000 < 50) {
  1124. // this.weighingList.receivableWeighingFee = 360
  1125. // this.weighingList.actualWeighingFee = 360
  1126. // } else if (
  1127. // this.weighingList.grossWeight / 1000 > 50 ||
  1128. // this.weighingList.grossWeight / 1000 < 65
  1129. // ) {
  1130. // this.weighingList.receivableWeighingFee = 390
  1131. // this.weighingList.actualWeighingFee = 390
  1132. // } else if (
  1133. // this.weighingList.grossWeight / 1000 > 65 ||
  1134. // this.weighingList.grossWeight / 1000 < 75
  1135. // ) {
  1136. // this.weighingList.receivableWeighingFee = 410
  1137. // this.weighingList.actualWeighingFee = 410
  1138. // } else if (
  1139. // this.weighingList.grossWeight / 1000 > 75 ||
  1140. // this.weighingList.grossWeight / 1000 < 80
  1141. // ) {
  1142. // this.weighingList.receivableWeighingFee = 430
  1143. // this.weighingList.actualWeighingFee = 430
  1144. // } else if (
  1145. // this.weighingList.grossWeight / 1000 > 80 ||
  1146. // this.weighingList.grossWeight / 1000 < 85
  1147. // ) {
  1148. // this.weighingList.receivableWeighingFee = 450
  1149. // this.weighingList.actualWeighingFee = 450
  1150. // } else if (
  1151. // this.weighingList.grossWeight / 1000 > 85 ||
  1152. // this.weighingList.grossWeight / 1000 < 95
  1153. // ) {
  1154. // this.weighingList.receivableWeighingFee = 480
  1155. // this.weighingList.actualWeighingFee = 480
  1156. // } else if (
  1157. // this.weighingList.grossWeight / 1000 > 95 ||
  1158. // this.weighingList.grossWeight / 1000 < 105
  1159. // ) {
  1160. // this.weighingList.receivableWeighingFee = 500
  1161. // this.weighingList.actualWeighingFee = 500
  1162. // } else if (
  1163. // this.weighingList.grossWeight / 1000 > 105 ||
  1164. // this.weighingList.grossWeight / 1000 < 120
  1165. // ) {
  1166. // this.weighingList.receivableWeighingFee = 540
  1167. // this.weighingList.actualWeighingFee = 540
  1168. // }
  1169. // } else {
  1170. // this.weighingList.receivableWeighingFee = ''
  1171. // }
  1172. },
  1173. tabClick(val) {
  1174. this.mListTop = []
  1175. this.mListBottom = []
  1176. this.pListTop = []
  1177. this.pListBottom = []
  1178. this.carWeightInfo.carNumber = ''
  1179. this.weighingList = []
  1180. this.index = val
  1181. if (val == 0) {
  1182. this.information = '毛重'
  1183. this.tpyeNo = '1'
  1184. } else {
  1185. this.tpyeNo = '2'
  1186. this.information = '皮重'
  1187. }
  1188. if (this.tpyeNo == 2 && this.inWarehouseType == 1) { //贸易入库不能二次称皮重(没有已称皮重按钮)
  1189. this.status = 1 //手动更改未称皮重状态
  1190. }
  1191. this.getList()
  1192. },
  1193. setCurrent(row) {
  1194. this.$refs.singleTable.setCurrentRow(row)
  1195. },
  1196. handleCurrentChange(val) {
  1197. this.submitAllow = false
  1198. if (val) {
  1199. this.currentRow = val
  1200. this.carWeightInfo = {
  1201. carNumber: val.carNumber,
  1202. type: this.information,
  1203. weight: val.grossWeight,
  1204. }
  1205. this.weighingList = val
  1206. if (val.qualityInspectionManagement) {
  1207. this.weighingList.boxNo = val.qualityInspectionManagement.boxNo
  1208. this.weighingList.boxNoOther = val.qualityInspectionManagement.boxNoOther
  1209. this.weighingList.titleNo = val.qualityInspectionManagement.titleNo
  1210. this.weighingList.titleNoOther = val.qualityInspectionManagement.titleNoOther
  1211. if (this.tpyeNo == 2 && this.status == 1 && val && val.qualityInspectionManagement.confirm == 0 && this
  1212. .warehouseName != '克东千丰库') {
  1213. this.submitAllow = true
  1214. this.$message({
  1215. message: '该条质检信息未确认',
  1216. type: 'warning'
  1217. });
  1218. }
  1219. this.paramType = val.qualityInspectionManagement.paramType
  1220. }
  1221. }
  1222. },
  1223. cancel() {
  1224. if (this.reader) {
  1225. this.reader.cancel()
  1226. }
  1227. this.$router.push({
  1228. path: 'weighingManagement',
  1229. })
  1230. },
  1231. calculation(status) {
  1232. // if (this.weighingList.grossWeight && this.weighingList.tare) {
  1233. // this.weighingList.netWeight = this.weighingList.grossWeight - this.weighingList.tare - parseInt(this.weighingList.buckleMiscellaneous)
  1234. // this.weighingList.netWeight = this.weighingList.netWeight.toFixed(2)
  1235. // }
  1236. },
  1237. printSmall() {
  1238. window.open(
  1239. '../../../../static/weightCheck.html?type=1&tableData=' +
  1240. JSON.stringify(this.inspect).replace(/%/g, 'baifenhao'))
  1241. },
  1242. printBig() {
  1243. window.open(
  1244. '../../../../static/weightCheck.html?type=2&tableData=' +
  1245. JSON.stringify(this.inspect).replace(/%/g, 'baifenhao'))
  1246. },
  1247. opendBtn() {
  1248. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  1249. let dataURL = canvas.toDataURL('image/png')
  1250. this.imgUrl = dataURL
  1251. if (this.imgUrl !== '') {
  1252. let b = this.dataURLtoFile(this.imgUrl, 'printImage')
  1253. let formdata = new FormData()
  1254. formdata.append('file', b)
  1255. axios({
  1256. method: 'post',
  1257. url: 'https://www.zthymaoyi.com/upload/admin',
  1258. data: formdata,
  1259. }).then((response) => {
  1260. //编辑接口
  1261. this.weighingList.pictureAddress = response.data.url
  1262. tare(this.weighingList)
  1263. .toPromise()
  1264. .then((response) => {})
  1265. })
  1266. }
  1267. })
  1268. },
  1269. closeDialog() {
  1270. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  1271. let dataURL = canvas.toDataURL('image/png')
  1272. this.imgUrl = dataURL
  1273. if (this.imgUrl !== '') {
  1274. let b = this.dataURLtoFile(this.imgUrl, 'printImage')
  1275. let formdata = new FormData()
  1276. formdata.append('file', b)
  1277. axios({
  1278. method: 'post',
  1279. url: 'https://www.zthymaoyi.com/upload/admin',
  1280. data: formdata,
  1281. }).then((response) => {
  1282. //编辑接口
  1283. if (this.inWarehouseType == 1) {
  1284. this.weighingList = this.inOutData
  1285. this.weighingList.pictureAddress = response.data.url
  1286. tare(this.weighingList)
  1287. .toPromise()
  1288. .then((response) => {})
  1289. } else {
  1290. this.weighingList.pictureAddress = response.data.url
  1291. tare(this.weighingList)
  1292. .toPromise()
  1293. .then((response) => {})
  1294. }
  1295. })
  1296. this.dialogTableVisible = true
  1297. }
  1298. })
  1299. this.isShowPrint = false
  1300. },
  1301. closePrint() {
  1302. this.isShowPrint = false
  1303. },
  1304. check(name, type) {
  1305. if (type == 1) {
  1306. for (var _tmp = 0; _tmp < this.ewCustomerOptions.length; _tmp++) {
  1307. if (this.ewCustomerOptions[_tmp].label == name) {
  1308. return false
  1309. }
  1310. }
  1311. return true
  1312. } else if (type == 2) {
  1313. for (var _tmp = 0; _tmp < this.companyNameEWOptions.length; _tmp++) {
  1314. if (this.companyNameEWOptions[_tmp].label == name) {
  1315. return false
  1316. }
  1317. }
  1318. return true
  1319. }
  1320. },
  1321. print() {
  1322. if (this.reader) {
  1323. this.reader.cancel()
  1324. }
  1325. if(!this.weighingList.id){
  1326. this.$message({
  1327. message: '请选择一条已经质检过的数据',
  1328. type: 'warning',
  1329. })
  1330. return
  1331. }
  1332. if (!this.weighingList.grossWeight) {
  1333. this.$message({
  1334. message: '毛重不能为空',
  1335. type: 'warning',
  1336. })
  1337. return
  1338. }
  1339. if (this.weighingList.grossWeight < 1 ||this.weighingList.grossWeight > 200000) {
  1340. this.$message({
  1341. message: '毛重输入错误',
  1342. type: 'warning',
  1343. })
  1344. return
  1345. }
  1346. if (
  1347. String(this.weighingList.grossWeight).indexOf('.') != -1 &&
  1348. String(this.weighingList.grossWeight).length -
  1349. (String(this.weighingList.grossWeight).indexOf('.') + 1) >
  1350. 1
  1351. ) {
  1352. this.$message({
  1353. message: '毛重输入错误',
  1354. type: 'warning',
  1355. })
  1356. return
  1357. }
  1358. if (this.tpyeNo == 2) {
  1359. if (!this.weighingList.tare) {
  1360. this.$message({
  1361. message: '皮重不能为空',
  1362. type: 'warning',
  1363. })
  1364. return
  1365. }
  1366. if (!this.weighingList.tare) {
  1367. this.$message({
  1368. message: '皮重不能为空',
  1369. type: 'warning',
  1370. })
  1371. return
  1372. }
  1373. if (Number(this.weighingList.tare) > Number(this.weighingList.grossWeight)) {
  1374. this.$message({
  1375. message: '皮重不能大于毛重',
  1376. type: 'warning',
  1377. })
  1378. return
  1379. }
  1380. if (this.weighingList.tare < 1 || this.weighingList.tare > 100000) {
  1381. this.$message({
  1382. message: '皮重输入错误',
  1383. type: 'warning',
  1384. })
  1385. return
  1386. }
  1387. if (
  1388. String(this.weighingList.tare).indexOf('.') != -1 &&
  1389. String(this.weighingList.tare).length -
  1390. (String(this.weighingList.tare).indexOf('.') + 1) >
  1391. 1
  1392. ) {
  1393. this.$message({
  1394. message: '皮重输入错误',
  1395. type: 'warning',
  1396. })
  1397. return
  1398. }
  1399. if (Number(this.weighingList.netWeight < 0)) {
  1400. this.$message({
  1401. message: '净重不能小于0',
  1402. type: 'warning',
  1403. })
  1404. return
  1405. }
  1406. }
  1407. if (this.tpyeNo == 2) {
  1408. if (this.submitAllow) {
  1409. this.$message.error('该条质检信息未确认')
  1410. return
  1411. }
  1412. }
  1413. this.$confirm('确定保存检斤信息?', '提示', {
  1414. confirmButtonText: '确定',
  1415. cancelButtonText: '取消',
  1416. type: 'warning',
  1417. })
  1418. .then(() => {
  1419. var that = this
  1420. var warehousing = {}
  1421. //贸易入库保存需要再走入库接口
  1422. if (this.inWarehouseType == 1) {
  1423. warehousing = JSON.parse(JSON.stringify(this.weighingList))
  1424. // warehousing = this.weighingList
  1425. warehousing.secretaryWeigher = localStorage.getItem('ws-pf_staffName')
  1426. warehousing.compId = localStorage.getItem('ws-pf_compId')
  1427. warehousing.inOutFlag = 2
  1428. let _data = JSON.parse(
  1429. localStorage.getItem('winseaview-userInfo')
  1430. )
  1431. warehousing.backOffice = _data.content.showCompName + '-' + _data.content.staffName
  1432. warehousing.grossWeight = this.weighingList.grossWeight
  1433. warehousing.tare = this.weighingList.tare
  1434. warehousing.netWeight = this.weighingList.netWeight
  1435. warehousing.pureWeight = this.weighingList.pureWeight
  1436. warehousing.deductionAmount = this.weighingList.deductionAmount
  1437. warehousing.deductionWeight = this.weighingList.deductionWeight
  1438. warehousing.warehouseInOutDetail = {}
  1439. warehousing.baseId = this.cangid
  1440. delete warehousing.qualityInspectionManagement
  1441. }
  1442. // 毛重
  1443. if (this.tpyeNo == 1) {
  1444. this.deptBudgetList.secretaryWeigher =
  1445. localStorage.getItem('ws-pf_staffName')
  1446. // console.log(this.weighingList)
  1447. if (this.weighingList.customerNumberCard) {
  1448. //毛检保存前进行校验
  1449. getamount({
  1450. compId: localStorage.getItem('ws-pf_compId'),
  1451. customerNumberCard: this.weighingList.customerNumberCard,
  1452. goodsName: this.weighingList.goodsName,
  1453. })
  1454. .toPromise()
  1455. .then((response) => {
  1456. for (let i = 0; i < this.purchasePriceList.length; i++) {
  1457. if (
  1458. this.weighingList.goodsName ==
  1459. this.purchasePriceList[i].goodsName
  1460. ) {
  1461. //累计售粮超上限不能完成毛检保存
  1462. let count = (
  1463. this.purchasePriceList[i].saleLimit -
  1464. response / 1000
  1465. ).toFixed(2)
  1466. // console.log(this.weighingList.grossWeight / 1000, '毛重转吨')
  1467. // this.weighingList.grossWeight/=1000
  1468. if (count - this.weighingList.grossWeight / 1000 < 0) {
  1469. this.$alert(
  1470. '该客户累计销售' +
  1471. this.weighingList.goodsName +
  1472. (response / 1000).toFixed(2) +
  1473. '吨,还可售粮' +
  1474. count +
  1475. '吨',
  1476. '提示', {
  1477. confirmButtonText: '确定',
  1478. callback: (action) => {
  1479. this.$message({
  1480. type: 'info',
  1481. message: `累计售粮已超出上限`,
  1482. })
  1483. },
  1484. }
  1485. )
  1486. } else {
  1487. //累计售粮没有超上限完成毛检保存
  1488. if (this.inWarehouseType == 1) { //判断贸易入库提交毛重
  1489. warehousing.grossWeight /= 1000
  1490. warehousing.tare /= 1000
  1491. warehousing.netWeight /= 1000
  1492. warehousing.pureWeight = 1000
  1493. warehousing.deductionAmount *= 1000
  1494. warehousing.deductionWeight /= 1000
  1495. warehousing.statusFlag = 1
  1496. warehousing.inOutFlag = 2
  1497. warehousing.id = warehousing.warehouseInOutId
  1498. warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
  1499. warehousing.weighingManagement = this.weighingList
  1500. newSubmit(warehousing)
  1501. .toPromise()
  1502. .then((response) => {
  1503. this.$notify.success({
  1504. title: '成功',
  1505. message: '保存成功',
  1506. })
  1507. this.getList()
  1508. })
  1509. } else { //收购入库
  1510. grossWeight(this.weighingList)
  1511. .toPromise()
  1512. .then((response) => {
  1513. if (this.reader) {
  1514. this.reader.cancel()
  1515. }
  1516. this.$notify.success({
  1517. title: '成功',
  1518. message: '保存成功',
  1519. })
  1520. this.getList()
  1521. })
  1522. }
  1523. //累计售粮没有超上限完成毛检保存
  1524. // this.weighingList.relationId = this.relationId;
  1525. // grossWeight(this.weighingList)
  1526. // .toPromise()
  1527. // .then((response) => {
  1528. // if (this.reader) {
  1529. // this.reader.cancel()
  1530. // }
  1531. // this.$notify.success({
  1532. // title: '成功',
  1533. // message: '保存成功',
  1534. // })
  1535. // //贸易入库需要再走入库接口
  1536. // if (this.inWarehouseType == 1) {
  1537. // warehousing.grossWeight /= 1000
  1538. // warehousing.tare /= 1000
  1539. // warehousing.netWeight /= 1000
  1540. // warehousing.pureWeight = 1000
  1541. // warehousing.deductionAmount *= 1000
  1542. // warehousing.deductionWeight /= 1000
  1543. // warehousing.statusFlag = 1
  1544. // warehousing.inOutFlag =2
  1545. // warehousing.id = warehousing.warehouseInOutId
  1546. // warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
  1547. // addstorageputList(warehousing).toPromise().then((response) => {
  1548. // if (response == 'OK') {
  1549. // this.getList()
  1550. // }
  1551. // })
  1552. // } else {
  1553. // this.getList()
  1554. // }
  1555. // })
  1556. // .catch((response) => {
  1557. // // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1558. // })
  1559. }
  1560. }
  1561. }
  1562. })
  1563. } else {
  1564. if (this.inWarehouseType == 1) { //贸易入库
  1565. warehousing.grossWeight /= 1000
  1566. warehousing.tare /= 1000
  1567. warehousing.netWeight /= 1000
  1568. warehousing.pureWeight = 1000
  1569. warehousing.deductionAmount *= 1000
  1570. warehousing.deductionWeight /= 1000
  1571. warehousing.statusFlag = 1
  1572. warehousing.inOutFlag = 2
  1573. delete warehousing.status
  1574. warehousing.id = warehousing.warehouseInOutId
  1575. warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
  1576. warehousing.weighingManagement = this.weighingList
  1577. newSubmit(warehousing)
  1578. .toPromise()
  1579. .then((response) => {
  1580. this.$notify.success({
  1581. title: '成功',
  1582. message: '保存成功',
  1583. })
  1584. this.getList()
  1585. })
  1586. } else { //收购入库
  1587. grossWeight(this.weighingList)
  1588. .toPromise()
  1589. .then((response) => {
  1590. if (this.reader) {
  1591. this.reader.cancel()
  1592. }
  1593. this.$notify.success({
  1594. title: '成功',
  1595. message: '保存成功',
  1596. })
  1597. this.getList()
  1598. })
  1599. }
  1600. // grossWeight(this.weighingList)
  1601. // .toPromise()
  1602. // .then((response) => {
  1603. // if (this.reader) {
  1604. // this.reader.cancel()
  1605. // }
  1606. // this.$notify.success({
  1607. // title: '成功',
  1608. // message: '保存成功',
  1609. // })
  1610. // //贸易入库需要再走入库接口
  1611. // if (this.inWarehouseType == 1) {
  1612. // warehousing.grossWeight /= 1000
  1613. // warehousing.tare /= 1000
  1614. // warehousing.netWeight /= 1000
  1615. // warehousing.pureWeight = 1000
  1616. // warehousing.deductionAmount *= 1000
  1617. // warehousing.deductionWeight /= 1000
  1618. // warehousing.statusFlag = 1
  1619. // warehousing.inOutFlag = 2
  1620. // delete warehousing.status
  1621. // warehousing.id = warehousing.warehouseInOutId
  1622. // warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
  1623. // addstorageputList(warehousing).toPromise().then((response) => {
  1624. // if (response == 'OK') {
  1625. // this.getList()
  1626. // }
  1627. // })
  1628. // } else {
  1629. // this.getList()
  1630. // }
  1631. // })
  1632. // .catch((response) => {
  1633. // // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1634. // })
  1635. }
  1636. } else if (this.tpyeNo == 2) {
  1637. //皮重
  1638. // //皮重检斤保存
  1639. // let _url1 = process.env.VUE_APP_BASE_API + '/weighingManagement/api/editTare'
  1640. // //查看结算单
  1641. // let _url2 = process.env.VUE_APP_BASE_API + '/warehouseInOutInfo/getInfo'
  1642. // // 入库添加
  1643. // let _url3 = process.env.VUE_APP_BASE_API + '/warehouseInOutInfo/InOutWarehouse'
  1644. // console.log(this.inWarehouseType)
  1645. //贸易入库需要再走入库接口
  1646. if (this.inWarehouseType == 1) { //贸易入库皮检
  1647. getsettleaccout({//查看结算单
  1648. id: this.weighingList.warehouseInOutId
  1649. }).toPromise().then((response) => {
  1650. that.inOutData = response
  1651. that.$set(that.inOutData, 'statusFlag', 3)
  1652. that.$set(that.inOutData, 'grossWeight', warehousing.grossWeight / 1000)
  1653. that.$set(that.inOutData, 'tare', warehousing.tare / 1000)
  1654. that.$set(that.inOutData, 'netWeight', warehousing.netWeight / 1000)
  1655. // that.$set(that.inOutData,'pureWeight',warehousing.pureWeight /1000)
  1656. that.$set(that.inOutData, 'deductionAmount', Number(warehousing.deductionAmount) * 1000)
  1657. that.$set(that.inOutData, 'deductionWeight', warehousing.deductionWeight / 1000)
  1658. that.$set(that.inOutData, 'inOutFlag', 2)
  1659. // that.inOutDate = response
  1660. // that.$set(that.inOutDate)
  1661. // .statusFlag = 3
  1662. // that.inOutDate.grossWeight=warehousing.grossWeight /1000
  1663. // that.inOutDate.tare=warehousing.tare /1000
  1664. // that.inOutDate.netWeight=warehousing.netWeight /1000
  1665. // that.inOutDate.pureWeight=warehousing.pureWeight /1000
  1666. // that.inOutDate.deductionAmount= Number(warehousing.deductionAmount) * 1000
  1667. // that.inOutDate.deductionWeight=warehousing.deductionWeight /1000
  1668. // that.inOutDate.inOutFlag = 2
  1669. // warehousing.statusFlag = 3
  1670. // warehousing.grossWeight /= 1000
  1671. // warehousing.tare /= 1000
  1672. // warehousing.netWeight /= 1000
  1673. // warehousing.pureWeight = 1000
  1674. // warehousing.deductionAmount = Number(warehousing.deductionAmount) * 1000
  1675. // warehousing.deductionWeight /= 1000
  1676. // warehousing.inOutFlag = 2
  1677. // console.log(that.weighingList)
  1678. // warehousing.inOutTypeKey = that.weighingList.inOutTypeKey
  1679. // warehousing.inOutType = that.weighingList.inOutType
  1680. // warehousing.deductionAmount = that.weighingList.deductionAmount
  1681. // warehousing.id = warehousing.warehouseInOutId
  1682. // // delete that.inOutDate.status
  1683. // that.inOutDate = Object.assign(that.inOutDate, warehousing)
  1684. that.weighingList.warehouseId = that.cangid;
  1685. that.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
  1686. that.inOutData.weighingManagement = that.weighingList
  1687. newSubmit(that.inOutData).toPromise().then((response) => { //检斤新接口
  1688. this.$notify.success({
  1689. title: '成功',
  1690. message: '保存成功',
  1691. })
  1692. this.idPrint = response
  1693. if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' ||
  1694. this
  1695. .warehouseName == '哈尔滨依兰库' || this
  1696. .warehouseName == '白城内陆港'|| this
  1697. .warehouseName == '山东园丰库')) {
  1698. if (this.weighingList.seller && this.weighingList.buyer) {
  1699. let cang = {}
  1700. cang.value = this.weighingList.seller
  1701. cang.label = this.weighingList.seller
  1702. if (this.check(this.weighingList.seller, 1)) {
  1703. this.ewCustomerOptions.push(cang)
  1704. }
  1705. let cang1 = {}
  1706. cang1.value = this.weighingList.buyer
  1707. cang1.label = this.weighingList.buyer
  1708. if (this.check(this.weighingList.buyer, 2)) {
  1709. this.companyNameEWOptions.push(cang1)
  1710. }
  1711. }
  1712. }
  1713. this.isShowPrintType = true
  1714. this.getList()
  1715. })
  1716. // addstorageputList(that.inOutData).toPromise().then((response) => {
  1717. // this.weighingList.warehouseId = this.cangid;
  1718. // this.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
  1719. // tare(this.weighingList)
  1720. // .toPromise()
  1721. // .then((response) => {
  1722. // console.log(1111)
  1723. // // if (this.reader) {
  1724. // // this.reader.cancel()
  1725. // // }
  1726. // this.$notify.success({
  1727. // title: '成功',
  1728. // message: '保存成功',
  1729. // })
  1730. // this.idPrint = response
  1731. // if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
  1732. // .warehouseName == '哈尔滨依兰库' || this
  1733. // .warehouseName == '白城内陆港')) {
  1734. // if (this.weighingList.seller && this.weighingList.buyer) {
  1735. // let cang = {}
  1736. // cang.value = this.weighingList.seller
  1737. // cang.label = this.weighingList.seller
  1738. // if (this.check(this.weighingList.seller, 1)) {
  1739. // this.ewCustomerOptions.push(cang)
  1740. // }
  1741. // let cang1 = {}
  1742. // cang1.value = this.weighingList.buyer
  1743. // cang1.label = this.weighingList.buyer
  1744. // if (this.check(this.weighingList.buyer, 2)) {
  1745. // this.companyNameEWOptions.push(cang1)
  1746. // }
  1747. // }
  1748. // }
  1749. // this.isShowPrintType = true
  1750. // this.getList()
  1751. // })
  1752. // .catch((response) => {})
  1753. // })
  1754. })
  1755. } else { //收购入库皮检
  1756. tare(this.weighingList)
  1757. .toPromise()
  1758. .then((response) => {
  1759. // if (this.reader) {
  1760. // this.reader.cancel()
  1761. // }
  1762. this.$notify.success({
  1763. title: '成功',
  1764. message: '保存成功',
  1765. })
  1766. this.idPrint = response
  1767. if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
  1768. .warehouseName == '哈尔滨依兰库' || this
  1769. .warehouseName == '白城内陆港'|| this
  1770. .warehouseName == '山东园丰库')) {
  1771. if (this.weighingList.seller && this.weighingList.buyer) {
  1772. let cang = {}
  1773. cang.value = this.weighingList.seller
  1774. cang.label = this.weighingList.seller
  1775. if (this.check(this.weighingList.seller, 1)) {
  1776. this.ewCustomerOptions.push(cang)
  1777. }
  1778. let cang1 = {}
  1779. cang1.value = this.weighingList.buyer
  1780. cang1.label = this.weighingList.buyer
  1781. if (this.check(this.weighingList.buyer, 2)) {
  1782. this.companyNameEWOptions.push(cang1)
  1783. }
  1784. }
  1785. }
  1786. this.isShowPrintType = true
  1787. this.getList()
  1788. })
  1789. .catch((response) => {})
  1790. }
  1791. }
  1792. })
  1793. .catch(() => {
  1794. return false
  1795. })
  1796. },
  1797. },
  1798. }
  1799. </script>
  1800. <style lang="scss" scoped>
  1801. /deep/.el-pagination {
  1802. margin-bottom: 0;
  1803. }
  1804. .stocks {
  1805. position: relative;
  1806. /deep/.el-select {
  1807. width: 30.33%;
  1808. }
  1809. /deep/.el-select>.el-input {
  1810. display: inline-block;
  1811. }
  1812. /deep/>.el-input {
  1813. width: 29.3333%;
  1814. }
  1815. .add,
  1816. .del {
  1817. position: absolute;
  1818. right: 16px;
  1819. transform: translateY(20%);
  1820. width: 20px;
  1821. height: 20px;
  1822. }
  1823. .del {
  1824. right: -7px;
  1825. }
  1826. }
  1827. .center {
  1828. background: #E8ECF6;
  1829. }
  1830. .ws-info-table {
  1831. border: none;
  1832. // height: 610px;
  1833. margin-top: 30px;
  1834. }
  1835. .ws-info-table .el-form-item {
  1836. width: 100%;
  1837. border: none;
  1838. }
  1839. .formItem {
  1840. width: 100%;
  1841. display: inline;
  1842. }
  1843. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1844. width: 25%;
  1845. text-align: center;
  1846. background: #ffffff;
  1847. font-size: 14px;
  1848. color: #8890b1;
  1849. }
  1850. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1851. border: none;
  1852. }
  1853. .title {
  1854. font-size: 16px;
  1855. font-weight: 600;
  1856. margin: 10px;
  1857. }
  1858. .substance {
  1859. padding-bottom: 20px;
  1860. overflow-x: scroll;
  1861. .active {
  1862. background: #5878e8;
  1863. color: white;
  1864. }
  1865. // background: #ffffff;
  1866. width: 100%;
  1867. height: calc(100vh - 125px);
  1868. border-radius: 4px;
  1869. margin: 0 auto;
  1870. display: flex;
  1871. .left {
  1872. width: 30%;
  1873. min-width: 560px;
  1874. position: relative;
  1875. // padding:0 20px 20px 20px;
  1876. .top {
  1877. background: black;
  1878. color: #2aff7c;
  1879. font-size: 32px;
  1880. text-align: right;
  1881. padding: 0 10px 0 20px;
  1882. border-radius: 10px;
  1883. margin: 0 20px 20px 20px;
  1884. position: absolute;
  1885. top: 130px;
  1886. width: 91%;
  1887. .zujian {
  1888. position: relative;
  1889. }
  1890. .kg-style {
  1891. font-size: 30px;
  1892. color: red;
  1893. }
  1894. .confirmInfo {
  1895. display: flex;
  1896. .car-type {
  1897. text-align: left;
  1898. width: 50%;
  1899. }
  1900. .car-no {
  1901. width: 50%;
  1902. text-align: right;
  1903. }
  1904. }
  1905. .confirmWeight {
  1906. display: flex;
  1907. .titleWeight {
  1908. width: 35%;
  1909. text-align: left;
  1910. line-height: 90px;
  1911. color: red;
  1912. }
  1913. .weight {
  1914. width: 65%;
  1915. text-align: right;
  1916. color: red;
  1917. }
  1918. }
  1919. }
  1920. .bottom {
  1921. // text-align: center;
  1922. background: white;
  1923. margin: 20px 20px 0 20px;
  1924. border-radius: 10px;
  1925. padding-bottom: 20px;
  1926. .img1,
  1927. .img2 {
  1928. width: 200px;
  1929. padding: 20px;
  1930. }
  1931. .video-content {
  1932. width: 100%;
  1933. }
  1934. .video1 {
  1935. text-align: center;
  1936. }
  1937. }
  1938. }
  1939. .right {
  1940. width: 70%;
  1941. // padding: 20px;
  1942. height: 750px;
  1943. border-radius: 10px;
  1944. .tab {
  1945. display: flex;
  1946. margin-bottom: 5px;
  1947. .tab-item {
  1948. padding: 5px 10px;
  1949. margin-right: 20px;
  1950. border-radius: 10px;
  1951. }
  1952. .in_css,
  1953. .in_cssno,
  1954. .in_cssno1,
  1955. .in_css1 {
  1956. width: 80px;
  1957. height: 32px;
  1958. padding: 3px 10px;
  1959. border-radius: 4px;
  1960. margin-right: 10px;
  1961. font-size: 15px;
  1962. line-height: 28px;
  1963. text-align: center;
  1964. font-weight: 600;
  1965. }
  1966. .in_css:hover,
  1967. .in_cssno:hover,
  1968. .in_cssno1:hover,
  1969. .in_css1:hover {
  1970. cursor: pointer;
  1971. }
  1972. .in_css {
  1973. color: #5878E8;
  1974. background: #F0F6FF;
  1975. }
  1976. .in_css1 {
  1977. color: #5878E8;
  1978. }
  1979. .in_cssno1 {
  1980. color: #8890B1;
  1981. }
  1982. /deep/.el-badge__content.is-fixed {
  1983. top: 3px;
  1984. right: 26px;
  1985. }
  1986. }
  1987. .weigh_btn {
  1988. height: 35px;
  1989. border-bottom: 1px solid #D8DCE6;
  1990. }
  1991. .table-title {
  1992. background: red;
  1993. .top {
  1994. display: inline-block;
  1995. width: 48%;
  1996. .top-item {
  1997. display: inline-block;
  1998. }
  1999. }
  2000. }
  2001. .table {
  2002. background: red;
  2003. .table-content {
  2004. background: green;
  2005. display: inline-block;
  2006. width: 50%;
  2007. .table-content-item {
  2008. display: inline-block;
  2009. }
  2010. }
  2011. }
  2012. }
  2013. }
  2014. /deep/.el-table .el-table__header .cell,
  2015. /deep/.el-table .el-table__body .cell {
  2016. text-align: center;
  2017. font-size: 16px;
  2018. // background: #f6f7fc;
  2019. }
  2020. // /deep/.el-table td {
  2021. // background: #e7e8ef;
  2022. // }
  2023. /deep/.el-table--enable-row-transition .el-table__body td {
  2024. text-align: center;
  2025. }
  2026. .bg-left {
  2027. height: 60px;
  2028. background: #F6F7FC;
  2029. // padding-left: 30px;
  2030. line-height: 60px;
  2031. }
  2032. .titleup {
  2033. position: relative;
  2034. }
  2035. .titleup::before {
  2036. content: '';
  2037. display: inline-block;
  2038. width: 5px;
  2039. height: 30px;
  2040. background: #5473e8;
  2041. position: absolute;
  2042. left: 0;
  2043. top: 14px;
  2044. }
  2045. .butCss {
  2046. // opacity: 0;
  2047. margin-left: 20px;
  2048. color: #5473E8;
  2049. background: #ffffff;
  2050. }
  2051. /deep/.el-dialog__title {
  2052. font-size: 24px !important;
  2053. }
  2054. /deep/.el-dialog__header {
  2055. text-align: center !important;
  2056. padding: 10px 0 !important;
  2057. height: auto !important;
  2058. }
  2059. .weight {
  2060. font-size: 68px;
  2061. }
  2062. .right-content {
  2063. display: flex;
  2064. height: calc(100vh - 25vh);
  2065. .left1 {
  2066. position: relative;
  2067. background: #ffffff;
  2068. // padding: 10px;
  2069. border-radius: 4px;
  2070. min-width: 355px;
  2071. width: 40%;
  2072. min-height: 760px;
  2073. .but {
  2074. position: absolute;
  2075. left: 0;
  2076. right: 0;
  2077. margin: auto;
  2078. justify-content: flex-end;
  2079. display: flex;
  2080. margin-right: 17px;
  2081. bottom: 20px;
  2082. }
  2083. .weightInfo {
  2084. padding: 10px;
  2085. }
  2086. /deep/.el-input.is-disabled .el-input__inner {
  2087. background: #F5F7FA !important;
  2088. border: none;
  2089. }
  2090. }
  2091. .titlesign::before {
  2092. content: '';
  2093. display: inline-block;
  2094. width: 5px;
  2095. height: 30px;
  2096. background: #5473e8;
  2097. position: absolute;
  2098. left: 0;
  2099. top: 14px;
  2100. }
  2101. .weightTitle {
  2102. width: 100%;
  2103. height: 60px;
  2104. background: #F6F7FC;
  2105. margin-bottom: 6px;
  2106. border-radius: 4px;
  2107. line-height: 60px;
  2108. }
  2109. .left {
  2110. width: 40%;
  2111. }
  2112. .right {
  2113. width: 60%;
  2114. }
  2115. }
  2116. .car-right {
  2117. width: 60%;
  2118. background: #ffffff;
  2119. padding: 10px;
  2120. margin-left: 20px;
  2121. border-radius: 4px;
  2122. min-height: 760px;
  2123. }
  2124. .screen {
  2125. margin-bottom: 10px;
  2126. width: 100%;
  2127. display: flex;
  2128. .screen_left {
  2129. min-width: 215px;
  2130. width: 30%;
  2131. display: flex;
  2132. .select_css,
  2133. .noselect_css {
  2134. width: 76px;
  2135. height: 32px;
  2136. padding: 3px 10px;
  2137. border-radius: 4px;
  2138. margin-right: 10px;
  2139. font-size: 14px;
  2140. line-height: 28px;
  2141. text-align: center;
  2142. }
  2143. .select_css:hover,
  2144. .noselect_css:hover {
  2145. cursor: pointer;
  2146. }
  2147. .select_css {
  2148. color: #5878E8;
  2149. background: #F0F6FF;
  2150. }
  2151. }
  2152. .screen_right {
  2153. width: 70%;
  2154. justify-content: flex-end;
  2155. display: flex;
  2156. margin-right: 30px;
  2157. .jilu {
  2158. color: #5878E8;
  2159. }
  2160. .jilu:hover {
  2161. cursor: pointer;
  2162. }
  2163. }
  2164. /deep/.el-select {
  2165. width: 50%;
  2166. }
  2167. }
  2168. .frame {
  2169. border-bottom: 1px solid #D8DCE6;
  2170. height: 40px;
  2171. }
  2172. .word_css {
  2173. margin-left: 15px;
  2174. font-size: 18px;
  2175. font-weight: 600;
  2176. text-align: left;
  2177. }
  2178. .mask {
  2179. background: black;
  2180. width: 100vw;
  2181. height: 100vh;
  2182. position: fixed;
  2183. top: 0;
  2184. z-index: 99;
  2185. opacity: 0.3;
  2186. }
  2187. .print-type-title {
  2188. text-align: center;
  2189. font-size: 18px;
  2190. margin: 20px;
  2191. }
  2192. .bottom-btn {
  2193. display: flex;
  2194. margin-top: 20px;
  2195. justify-content: space-around;
  2196. }
  2197. .print-type-checkbox {
  2198. // padding-left: 20px;
  2199. }
  2200. .print-type {
  2201. position: absolute;
  2202. top: 0;
  2203. bottom: 0;
  2204. left: 0;
  2205. right: 0;
  2206. margin: auto;
  2207. width: 440px;
  2208. height: 320px;
  2209. background: white;
  2210. border-radius: 10px;
  2211. z-index: 999;
  2212. }
  2213. /deep/.el-radio-group {
  2214. width: 100%;
  2215. display: flex;
  2216. }
  2217. /deep/.el-radio__label {
  2218. font-size: 20px;
  2219. }
  2220. /deep/.el-radio__inner {
  2221. // background: red;
  2222. height: 20px;
  2223. width: 20px;
  2224. }
  2225. .label-width {
  2226. width: 100%;
  2227. text-align: center;
  2228. font-size: 20px;
  2229. }
  2230. .show-excel {
  2231. opacity: 0;
  2232. }
  2233. /deep/.base_header_layout .find.el-button--primary {
  2234. width: 30px;
  2235. border-top-left-radius: 0px;
  2236. border-bottom-left-radius: 0px;
  2237. }
  2238. /deep/.base_header_layout .findinput input {
  2239. border-top-right-radius: 0px;
  2240. border-bottom-right-radius: 0px;
  2241. }
  2242. .ew-print {
  2243. padding: 0 20px;
  2244. margin-top: 10px;
  2245. // display: flex;
  2246. // justify-content: space-between;
  2247. // align-content: center;
  2248. .row {
  2249. display: flex;
  2250. margin-top: 10px;
  2251. align-items: center;
  2252. }
  2253. }
  2254. .sh-address {
  2255. display: flex;
  2256. }
  2257. .print-type-ew {
  2258. display: flex;
  2259. justify-content: space-between;
  2260. padding: 0 20px;
  2261. /deep/.el-radio__label {
  2262. font-size: 14px;
  2263. }
  2264. margin-top: 10px;
  2265. }
  2266. /deep/.el-table .cell {
  2267. text-align: center;
  2268. }
  2269. .shdw-style {
  2270. display: flex;
  2271. justify-content: space-between;
  2272. align-items: center;
  2273. padding: 0 20px;
  2274. margin-top: 20px;
  2275. }
  2276. /deep/.el-table__body .current-row td {
  2277. border-top: 4px solid #2aff7c;
  2278. border-bottom: 4px solid #2aff7c;
  2279. }
  2280. /deep/.el-table__body .current-row td:first-child {
  2281. border-left: 4px solid #2aff7c;
  2282. // border-bottom: 1px solid #2aff7c ;
  2283. }
  2284. /deep/.el-table__body .current-row td:last-child {
  2285. border-right: 4px solid #2aff7c;
  2286. // border-bottom: 1px solid #2aff7c ;
  2287. }
  2288. </style>