weighingManagementNew.vue 104 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763
  1. <template>
  2. <div class="center">
  3. <BaseHeaderLayout :leftSpan="12">
  4. <template slot="left">
  5. </template>
  6. <template slot="right">
  7. <el-select style="width:400px;" v-model="warehouseName" filterable placeholder="" @change="warehouseNameChange" :value="searchType">
  8. <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  9. style="color: #8890b1" />
  10. </el-select>
  11. </template>
  12. </BaseHeaderLayout>
  13. <div style="display: flex;">
  14. <div style="background: #f6f7fc; padding: 10px" class="grid-content bg-purple size_css">
  15. <BalanceAlert v-if="isShowBalance" ref="weightChild" :deptBudgetList="deptBudgetList" :information="information"
  16. v-on:balanceListen="setVal" class="zujian">
  17. </BalanceAlert>
  18. <div class="top">
  19. <div class="confirmWeight">
  20. <div class="titleWeight">确认重量</div>
  21. <div v-if="index == 0" class="weight">
  22. {{ weighingList.tare }} <span class="kg-style">kg</span>
  23. </div>
  24. <div v-else class="weight">
  25. {{ weighingList.grossWeight }} <span class="kg-style">kg</span>
  26. </div>
  27. </div>
  28. <div class="confirmInfo">
  29. <div class="car-type">车牌号</div>
  30. <div class="car-no">{{ weighingList.carNumber }}</div>
  31. </div>
  32. <!-- <el-button @click="weightweight" type="success" plain>确定</el-button> -->
  33. </div>
  34. <div class="bg-left titleup">
  35. <span class="word_css">实时监控</span>
  36. </div>
  37. <div class="bottom">
  38. <div v-if="!monitorUrl1" class="video1">
  39. <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
  40. <div>监控视频未连接</div>
  41. </div>
  42. <div v-else class="video1">
  43. <iframe :src="monitorUrl1" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
  44. mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
  45. </div>
  46. <div v-if="!monitorUrl2" class="video1">
  47. <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
  48. <div>监控视频未连接</div>
  49. </div>
  50. <div v-else class="video2">
  51. <iframe :src="monitorUrl2" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
  52. mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
  53. </div>
  54. </div>
  55. </div>
  56. <div>
  57. <el-row :gutter="20">
  58. <el-col :span="12">
  59. <div class="grid-content bg-purple">
  60. <div class="tab weigh_btn">
  61. <el-button :type="tpyeNo == 1 ? 'primary' : ''">
  62. <!-- <el-badge :value="mListTop.length" class="badge_item"> -->
  63. <div @click="tabClick(0)">称皮重</div>
  64. </el-button>
  65. <!-- </el-badge> -->
  66. <el-button :type="tpyeNo == 2 ? 'primary' : ''">
  67. <!-- <el-badge :value="pListTop.length" class="badge_item"> -->
  68. <div @click="tabClick(1)">称毛重</div>
  69. <!-- </el-badge> -->
  70. </el-button>
  71. </div>
  72. <ws-form class="right-content">
  73. <div class="left1">
  74. <div class="weightInfo">
  75. <ws-info-table>
  76. <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
  77. <el-select v-if="tpyeNo == 1" :disabled="recheck" filterable clearable
  78. v-model="weighingList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect"
  79. @change="contractNoChange">
  80. <el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo"
  81. :value="item.inOutTaskNo" />
  82. </el-select>
  83. <ws-input v-else v-model="weighingList.inOutTaskNo" placeholder="自动获取,不可编辑" maxlength="100"
  84. disabled size="small" />
  85. </ws-form-item>
  86. <!-- <ws-form-item label="业务编号" span="1" prop="number">
  87. <ws-input v-model="weighingList.number" placeholder="自动获取,不可编辑" maxlength="100" disabled
  88. size="small" />
  89. </ws-form-item> -->
  90. <ws-form-item label="合同编号" span="1" prop="contractNo" v-show="inWarehouseType == 1"
  91. v-if="weighingList.contractNo && tpyeNo == 1">
  92. <ws-input v-model="weighingList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
  93. size="small" />
  94. </ws-form-item>
  95. <ws-form-item label="移库编号" span="1" prop="moveTaskNo" v-show="inWarehouseType == 1"
  96. v-if="!weighingList.contractNo && tpyeNo == 1">
  97. <ws-input v-model="weighingList.moveTaskNo" placeholder="自动获取,不可编辑" maxlength="100" size="small"
  98. disabled />
  99. </ws-form-item>
  100. <ws-form-item v-if="tpyeNo == 1" label="已完成量(吨)" span="1" prop="tips">
  101. <ws-input v-model="weighingList.donecount" placeholder="自动获取,不可编辑" maxlength="100" disabled
  102. size="small" />
  103. <!-- {{}} -->
  104. </ws-form-item>
  105. <ws-form-item v-if="tpyeNo == 1" label="提示" span="1" prop="tips">
  106. <ws-input v-model="weighingList.tips" placeholder="自动获取,不可编辑" maxlength="100" disabled
  107. size="small" />
  108. </ws-form-item>
  109. <ws-form-item label="货名" span="1" prop="goodsName">
  110. <ws-input v-model="weighingList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled
  111. size="small" />
  112. </ws-form-item>
  113. <ws-form-item v-if="tpyeNo == 1 && warehouseType == 1" label="仓位号" span="1" prop="inOutTaskNo">
  114. <el-select @change="binNumberchange" :disabled="recheck" filterable clearable
  115. v-model="weighingList.binNumber" placeholder="请选择仓位号" class="typeselect">
  116. <el-option v-for="item in positionInfos" :key="item.id" :label="item.binNumber"
  117. :value="item.binNumber" />
  118. </el-select>
  119. </ws-form-item>
  120. <ws-form-item v-if="tpyeNo == 1 && warehouseType == 1" label="囤位号" span="1" prop="storageNumber">
  121. <ws-input :disabled="recheck" v-model="weighingList.storageNumber" placeholder="选填,1-10个字符"
  122. maxlength="10" size="small" />
  123. </ws-form-item>
  124. <ws-form-item label="价格" span="1" prop="contractPrice">
  125. <ws-input :disabled="priceedit" v-model="weighingList.contractPrice" placeholder="请输入价格(元/吨)"
  126. maxlength="10" size="small" />
  127. </ws-form-item>
  128. <ws-form-item v-if="tpyeNo == 2" label="备注" span="1" prop="customer">
  129. <ws-input :disabled="recheck" v-model="weighingList.customer" placeholder="请输入备注"
  130. maxlength="10" size="small" />
  131. </ws-form-item>
  132. <ws-form-item v-if="tpyeNo == 1" label="出库类型" span="1">
  133. <ws-input v-model="weighingList.inOutType" class="right-bottom" disabled
  134. placeholder="自动获取,不可编辑" />
  135. <!-- :disabled="isSelectType" -->
  136. </ws-form-item>
  137. <ws-form-item v-if="tpyeNo == 1" label="出库日期" span="1" prop="inOutDate" class="deliverydate">
  138. <ws-date-picker v-model="weighingList.inOutDate" type="date" placeholder="请选择出库日期"
  139. value-format="yyyy-MM-dd" />
  140. </ws-form-item>
  141. <ws-form-item label="运输方式" span="1" prop="outType">
  142. <el-select @change="outTypechange" v-model="weighingList.outType" placeholder="请选择运输方式" :disabled="recheck1">
  143. <el-option v-for="item in multiSelector" :key="item.value" :label="item.name"
  144. :value="item.name" />
  145. </el-select>
  146. </ws-form-item>
  147. <ws-form-item v-if="fleetNameList.length > 0 && tpyeNo == 1&&weighingList.outType == '汽运'" label="车队" span="1" prop="fleetName">
  148. <el-select @change="fleetNameChange" :disabled="recheck" v-model="weighingList.fleet" placeholder="非车队车辆">
  149. <el-option key="" label="非车队"
  150. value="非车队" />
  151. <el-option v-for="item in fleetNameList" :key="item.value" :label="item.fleetName"
  152. :value="item.fleetName" />
  153. </el-select>
  154. </ws-form-item>
  155. <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
  156. weighingList.outType == '散船' ||
  157. weighingList.outType == '汽运' ||
  158. weighingList.outType == '集装箱船'
  159. ">
  160. <el-input :maxlength="'7'" v-if="carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
  161. size="small" :disabled="recheck1"/>
  162. <el-select v-else filterable clearable v-model="weighingList.carNo" placeholder="请选择车牌号"
  163. class="typeselect" @change="carChange" :disabled="recheck1">
  164. <el-option v-for="item in options2" :key="item.constKey"
  165. :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
  166. </el-select>
  167. <el-button type="primary" @click="carNoTypeChange" v-if="carstatus">{{ carChange1 }}</el-button>
  168. </ws-form-item>
  169. <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
  170. weighingList.outType == '汽运' ||
  171. weighingList.outType == '集装箱船'
  172. ">
  173. <ws-input v-model="weighingList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" :disabled="recheck1"/>
  174. </ws-form-item>
  175. <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
  176. weighingList.outType == '汽运' ||
  177. weighingList.outType == '集装箱船'
  178. ">
  179. <ws-input v-model="weighingList.titleNo" placeholder="请输入封号" maxlength="20" size="small" :disabled="recheck1"/>
  180. </ws-form-item>
  181. <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
  182. weighingList.outType == '汽运' ||
  183. weighingList.outType == '集装箱船'
  184. ">
  185. <ws-input v-model="weighingList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" :disabled="recheck1"/>
  186. </ws-form-item>
  187. <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
  188. weighingList.outType == '汽运' ||
  189. weighingList.outType == '集装箱船'
  190. ">
  191. <ws-input v-model="weighingList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" :disabled="recheck1"/>
  192. </ws-form-item>
  193. <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="weighingList.outType == '火运'">
  194. <ws-input v-model="weighingList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
  195. </ws-form-item>
  196. <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="weighingList.outType == '火运'">
  197. <ws-input v-model="weighingList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
  198. size="small" />
  199. </ws-form-item>
  200. <ws-form-item label="船名" span="1" prop="shipName" v-if="weighingList.outType == '散船'||weighingList.outType == '集装箱船'">
  201. <!-- <ws-input v-model="weighingList.shipName" placeholder="请输入船名" maxlength="20" size="small" /> -->
  202. <el-select :disabled="tpyeNo == 2" filterable clearable v-model="weighingList.shipName"
  203. placeholder="请选择船名" class="typeselect" @change="shipInfoChange($event)">
  204. <el-option v-for="item in shipInfoList" :key="item.id" :label="item.shipName"
  205. :value="item.shipName" />
  206. </el-select>
  207. </ws-form-item>
  208. <ws-form-item label="航次" span="1" prop="shipNumber" v-if="weighingList.outType == '散船'||weighingList.outType == '集装箱船'">
  209. <ws-input disabled v-model="weighingList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
  210. </ws-form-item>
  211. <ws-form-item v-if="tpyeNo == 2" label="毛重(KG)" span="1" prop="grossWeight">
  212. <ws-input type="number" @mousewheel.native.prevent v-if="tpyeNo == 2"
  213. v-model="weighingList.grossWeight" @input="calculation" placeholder="未获取到毛重" maxlength="100"
  214. size="small" :disabled="disabled" />
  215. <el-button v-if="tpyeNo == 2 && warehouseType == 1" @click="openPort">重新获取</el-button>
  216. <!-- <el-button v-if="tpyeNo == 2 && warehouseType == 2" @click="disabled = false">编辑</el-button> -->
  217. </ws-form-item>
  218. <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '毛重'">
  219. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare"
  220. @input="calculation" placeholder="未获取到皮重" maxlength="100" size="small" disabled />
  221. </ws-form-item>
  222. <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '皮重'">
  223. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare"
  224. @input="calculation" placeholder="未获取到皮重" maxlength="100" size="small" :disabled="disabled" />
  225. <el-button v-if="tpyeNo == 1 && warehouseType == 1" @click="openPort">重新获取</el-button>
  226. <!-- <el-button v-if="tpyeNo == 1 && warehouseType == 2" @click="disabled = false">编辑</el-button> -->
  227. </ws-form-item>
  228. <div class="formItem">
  229. <!-- <ws-form-item label="扣重(KG)" span="1" prop="buckleMiscellaneous" v-if="
  230. information == '毛重' &&
  231. (paramType == '2' || inWarehouseType == 1)
  232. ">
  233. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous"
  234. @input="calculation" placeholder="请输入扣重" maxlength="100" size="small" />
  235. </ws-form-item> -->
  236. <ws-form-item label="净重(KG)" span="1" prop="netWeight" v-if="information == '毛重'">
  237. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight"
  238. placeholder="自动计算,不可编辑" maxlength="100" size="small" disabled />
  239. </ws-form-item>
  240. <!-- <ws-form-item label="应收卸车过磅费(元)" span="1" prop="receivableWeighingFee" v-if="index == 1">
  241. <ws-input type="number" v-model="weighingList.receivableWeighingFee" placeholder="未获取到卸车过磅费金额"
  242. maxlength="100" size="small" disabled />
  243. </ws-form-item>
  244. <ws-form-item label="实收卸车过磅费(元)" span="1" prop="actualWeighingFee" v-if="index == 1">
  245. <ws-input type="number" v-model="weighingList.actualWeighingFee" placeholder="输入卸车过磅费" maxlength="100"
  246. size="small" />
  247. </ws-form-item> -->
  248. </div>
  249. </ws-info-table>
  250. <div class="but">
  251. <!-- <el-button @click="print" type="primary" :disabled="submitAllow">提交</el-button> -->
  252. <el-button @click="print" v-if="information == '毛重'" type="primary">提交</el-button>
  253. <el-button @click="print" v-if="information == '皮重'" type="primary" :disabled="submitAllow">提交
  254. </el-button>
  255. </div>
  256. <!-- <div>
  257. <div>粮源</div>
  258. <div class='stocks' v-for='(item,index) in stocks'>
  259. <el-select v-model="item.warehouseName" filterable placeholder="选择所属仓库" @change="warehouseNameChange" :value="searchType">
  260. <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  261. style="color: #8890b1" />
  262. </el-select>
  263. <el-select v-model="item.warehouseName" filterable placeholder="选择货名" @change="warehouseNameChange" :value="searchType">
  264. <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  265. style="color: #8890b1" />
  266. </el-select>
  267. <ws-input v-model="item.cost" placeholder="输入重量" maxlength="100"
  268. size="small" />
  269. <img class='add' @click='addstocks(index)' style='width:20px;height:20px;' src="../../../public/img/add.png" alt="">
  270. <img class='del' @click='delstocks(index)' style='width:20px;height:20px;' src="../../../public/img/del.png" alt="">
  271. </div>
  272. </div> -->
  273. <!-- </div> -->
  274. </div>
  275. </div>
  276. </ws-form>
  277. </div>
  278. </el-col>
  279. <el-col :span="12">
  280. <div class="list-info">
  281. <div style="justify-content: space-between;" class="flex">
  282. <div style="min-width:146px;">
  283. <el-button v-if="tpyeNo == 1" @click="add" type="primary">新增</el-button>
  284. <el-button v-if="tpyeNo == 1" @click="deletelist" type="danger">删除</el-button>
  285. <el-button v-if="tpyeNo == 2" @click="statustypechangelist(3)"
  286. :type="statusType == 3 ? 'primary' : ''">未称毛重
  287. </el-button>
  288. <!-- <el-button v-if="tpyeNo == 2" @click="statustypechangelist(2)"
  289. :type="statusType == 2 ? 'primary' : ''">已称毛重
  290. </el-button> -->
  291. </div>
  292. <div style="display: flex;">
  293. <el-button @click='refreshClick(1)' type="primary">刷新</el-button>
  294. <el-button @click='refreshClick' type="primary">{{timer?refresh:'自动刷新'}}</el-button>
  295. <el-button @click="record" type="primary">记录</el-button>
  296. </div>
  297. </div>
  298. <el-table @cell-click="listclick" :data="deliveryList" style="width: 100%; margin-top: 20px"
  299. ref="deliveryList" border>
  300. <el-table-column prop="number" width="120" label="业务编号"></el-table-column>
  301. <el-table-column prop="carNumber" label="车牌号"></el-table-column>
  302. <el-table-column prop="status" label="状态"></el-table-column>
  303. </el-table>
  304. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  305. :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
  306. :total="deptBudgetTotal">
  307. </el-pagination>
  308. </div>
  309. </el-col>
  310. </el-row>
  311. </div>
  312. </div>
  313. <div class="mask" v-show="isShowPrintType"></div>
  314. <div class="print-type" v-show="isShowPrintType">
  315. <div class="print-type-content">
  316. <div class="print-type-title">请选择打印类型</div>
  317. <div class="ew-print" v-if="checked||(!ddchecked&&!checked)">
  318. <div class="row">
  319. <div>我司发货单位:</div>
  320. <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
  321. <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
  322. </el-option>
  323. </el-select>
  324. </div>
  325. <div class="row">
  326. <div>我司收货单位:</div>
  327. <el-select v-model="myCompanyCustomer" disabled style="width: 75%;">
  328. </el-select>
  329. </div>
  330. </div>
  331. <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
  332. <div class="print-type-ew">
  333. <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
  334. <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
  335. </div>
  336. <div class="ew-print" v-if="printSeparately">
  337. <div class="row">
  338. <div>额外发货单位:</div>
  339. <!-- <div>{{companyName}}</div> -->
  340. <el-select v-model="ewCustomer" placeholder="请选择" style="width: 75%;">
  341. <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
  342. </el-option>
  343. </el-select>
  344. </div>
  345. <div class="row">
  346. <div>额外收货单位:</div>
  347. <!-- <div>{{companyNameEW}}</div> -->
  348. <el-select v-model="companyNameEW" placeholder="请选择" style="width: 75%;">
  349. <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
  350. :value="item.value">
  351. </el-option>
  352. </el-select>
  353. </div>
  354. </div>
  355. </div>
  356. </div>
  357. <div class="bottom-btn">
  358. <el-button @click="typePrintClick">确定</el-button>
  359. <el-button @click="typePrintCannelClick">取消</el-button>
  360. </div>
  361. </div>
  362. <!-- @opened="opendBtn" -->
  363. <el-dialog width="70%" class="title_css" center :visible.sync="isShowPrint" title="出库检斤单" @close="closeDialog"
  364. :close-on-click-modal="false">
  365. <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
  366. <div style="text-align: center">
  367. <el-button type="primary" @click="closePrint">关闭</el-button>
  368. <el-button type="primary" @click="printSmall">打印小票</el-button>
  369. <el-button type="primary" @click="printBig">打印单据</el-button>
  370. </div>
  371. </el-dialog>
  372. </div>
  373. </template>
  374. <script>
  375. import {
  376. grossWeight,
  377. getbinNumber,
  378. contractListWeighing,
  379. tareAdd,
  380. tareEdit,
  381. getweighing,
  382. getweighingList,
  383. selectWarehouseSelf,
  384. delelteWeighing,
  385. newSubmit,
  386. getInfo,
  387. gettask,
  388. getweight
  389. } from '@/model/outboundManagement/index'
  390. import {
  391. pullDown,
  392. addstorageputList,
  393. xialaNo,
  394. getstaff,
  395. getReceiptTaskNo,
  396. } from '@/model/warehouse/index'
  397. import axios from 'axios'
  398. import weightCheckPrint from './component/weightCheckPrint.vue'
  399. import inspectInfoPrint from './component/inspectInfoPrint.vue'
  400. import html2canvas from 'html2canvas'
  401. import WsUpload from '@/components/WsUpload'
  402. import BalanceAlert from '@/components/balanceAlert'
  403. import {
  404. EventBus
  405. } from 'base-core-lib'
  406. export default {
  407. components: {
  408. WsUpload,
  409. inspectInfoPrint,
  410. weightCheckPrint,
  411. BalanceAlert
  412. },
  413. data() {
  414. return {
  415. timer: '',
  416. refresh: 60,
  417. isShowBalance: false,
  418. isShowPrint: false,
  419. warehouseName: '',
  420. warehouseList: [],
  421. warehouseList1: [],
  422. currentPage: 1,
  423. pageSize: 50,
  424. shipInfoList:[],
  425. priceedit:false,
  426. submitAllow: false,
  427. deliveryList: [],
  428. inOutTypeList:[],
  429. positionInfos: [],
  430. searchKeyWord: '',
  431. paramType: '',
  432. deptBudgetTotal: 0,
  433. monitorUrl1: '',
  434. monitorUrl2: '',
  435. index: 0,
  436. inspect: {},
  437. stocks: [{
  438. warehouseName: '',
  439. weight: '',
  440. cost: ''
  441. }],
  442. id: 0,
  443. options2: [],
  444. isSelectType: false,
  445. recheck: false,
  446. recheck1:false,
  447. recheckPrice:false,
  448. disabled: true,
  449. pListTop: [],
  450. tpyeNo: 1,
  451. types: null,
  452. information: '皮重',
  453. carChange1: '手动填写',
  454. inWarehouseType: 1, //入库类型
  455. outContractNo: [],
  456. mListTop: [],
  457. searchType: '',
  458. taskNolist: [],
  459. storageType: [],
  460. fleetNameList: [],
  461. carstatus: false,
  462. carjudge: false,
  463. warehouseCount: '',
  464. warehouseCount1: 0,
  465. warehouseNo: '',
  466. statusType: '3',
  467. warehouseType: 1,
  468. weighingList: {
  469. grossWeight: '',
  470. tare: '',
  471. selfLoading: 0,
  472. buckleMiscellaneous: 0,
  473. netWeight: 0,
  474. weight: '',
  475. tips: '',
  476. carNo:'1231321',
  477. // contractNo:'',
  478. // inOutTaskNo:'',
  479. receivableWeighingFee: '',
  480. warehouseInOutDetail: {
  481. grade: '',
  482. imperfectGrain: '',
  483. impurity: '',
  484. jiaorenli: '',
  485. bulkDensity: '',
  486. mildewGrain: '',
  487. },
  488. qualityInspectionManagement: {
  489. boxNo: '暂无',
  490. boxNoOther: '暂无',
  491. titleNo: '暂无',
  492. titleNoOther: '暂无',
  493. },
  494. inOutDate: ''
  495. },
  496. carWeightInfo: {
  497. carNumber: '',
  498. type: '',
  499. weight: '',
  500. },
  501. ddchecked:false,
  502. checked:false,
  503. dialogDataList:[],
  504. ewCustomerOptions: [ {
  505. value: '天津建源供应链管理有限公司',
  506. label: '天津建源供应链管理有限公司'
  507. },{
  508. value: '厦门建发物产有限公司',
  509. label: '厦门建发物产有限公司'
  510. },{
  511. value: '黑龙江利润元粮食贸易有限公司',
  512. label: '黑龙江利润元粮食贸易有限公司'
  513. }, {
  514. value: '黑龙江众利合粮食贸易有限公司',
  515. label: '黑龙江众利合粮食贸易有限公司'
  516. }, {
  517. value: '黑龙江鑫满仓粮食贸易有限公司',
  518. label: '黑龙江鑫满仓粮食贸易有限公司'
  519. }, {
  520. value: '黑龙江中天昊元贸易有限公司',
  521. label: '黑龙江中天昊元贸易有限公司'
  522. },{
  523. value: '黑龙江欣洋粮食贸易有限公司',
  524. label: '黑龙江欣洋粮食贸易有限公司'
  525. }],
  526. companyNameOptions: [
  527. {
  528. value: '黑龙江中天昊元贸易有限公司',
  529. label: '黑龙江中天昊元贸易有限公司'
  530. }, {
  531. value: '黑龙江利润元粮食贸易有限公司',
  532. label: '黑龙江利润元粮食贸易有限公司'
  533. }, {
  534. value: '黑龙江众利合粮食贸易有限公司',
  535. label: '黑龙江众利合粮食贸易有限公司'
  536. }, {
  537. value: '黑龙江鑫满仓粮食贸易有限公司',
  538. label: '黑龙江鑫满仓粮食贸易有限公司'
  539. },{
  540. value: '黑龙江欣洋粮食贸易有限公司',
  541. label: '黑龙江欣洋粮食贸易有限公司'
  542. }],
  543. companyName: '黑龙江中天昊元贸易有限公司',
  544. companyNameEW: '黑龙江利润元粮食贸易有限公司',
  545. companyNameEWOptions: [{
  546. value: '黑龙江中天昊元贸易有限公司',
  547. label: '黑龙江中天昊元贸易有限公司'
  548. }, {
  549. value: '黑龙江利润元粮食贸易有限公司',
  550. label: '黑龙江利润元粮食贸易有限公司'
  551. }, {
  552. value: '黑龙江众利合粮食贸易有限公司',
  553. label: '黑龙江众利合粮食贸易有限公司'
  554. }, {
  555. value: '黑龙江鑫满仓粮食贸易有限公司',
  556. label: '黑龙江鑫满仓粮食贸易有限公司'
  557. },{
  558. value: '厦门建发物产有限公司',
  559. label: '厦门建发物产有限公司'
  560. },{
  561. value: '黑龙江欣洋粮食贸易有限公司',
  562. label: '黑龙江欣洋粮食贸易有限公司'
  563. }],
  564. idPrint: '',
  565. myCompanyCustomer:'',
  566. ewCustomer: '厦门建发物产有限公司',
  567. ewradio: '',
  568. printSeparately: false,
  569. isShowPrintType:false,
  570. deptBudgetList: {},
  571. multiSelector: [{
  572. name: '汽运',
  573. value: '0',
  574. },
  575. {
  576. name: '火运',
  577. value: '1',
  578. },
  579. {
  580. name: '集装箱船',
  581. value: '2',
  582. },
  583. {
  584. name: '散船',
  585. value: '3',
  586. },
  587. ],
  588. jjSelectPrintList: [],
  589. }
  590. },
  591. beforeDestroy() {
  592. if (this.timer) { //如果定时器还在运行 或者直接关闭,不用判断
  593. clearInterval(this.timer); //关闭
  594. }
  595. },
  596. mounted() {
  597. this.getNowTime()
  598. this.selectWarehouse()
  599. this.showType = this.isShow
  600. this.isShowBalance = true
  601. this.openPort()
  602. if (localStorage.getItem('houseSelfCollect_house1')) {
  603. if (localStorage.getItem('houseSelfCollect_house1').allowEdit == 1) {
  604. this.disabled = false
  605. } else {
  606. this.disabled = true
  607. }
  608. }
  609. },
  610. activated() {},
  611. methods: {
  612. shipInfoChange(e){
  613. for (let i = 0; i < this.shipInfoList.length; i++) {
  614. if(this.shipInfoList[i].shipName==this.weighingList.shipName){
  615. this.weighingList.shipNumber=this.shipInfoList[i].shipNo
  616. }
  617. }
  618. },
  619. async typePrintClick(type) {
  620. getweighing({
  621. id: this.idPrint
  622. })
  623. .toPromise()
  624. .then((response) => {
  625. this.dialogDataList = [] //点击确认时先清空要打印的数组
  626. this.dialogData = response
  627. if (response.compName == '黑龙江秋收有限公司') {
  628. this.dialogData.compName = '黑龙江中天昊元贸易有限公司'
  629. }
  630. if (this.checked) {
  631. if(this.dialogData&&!this.dialogData.customer&&this.dialogData.contractManagement){
  632. this.dialogData.customer = this.dialogData.contractManagement.seller
  633. }
  634. this.dialogDataList.push(this.dialogData)
  635. var _datas = JSON.stringify(this.dialogData)
  636. _datas = JSON.parse(_datas)
  637. _datas.compName =this.ewCustomer
  638. _datas.customer = this.companyNameEW
  639. this.dialogDataList.push(_datas)
  640. this.printBig('', this.radio)
  641. } else if (this.ddchecked) {
  642. _datas = this.dialogData
  643. _datas.compName = this.companyNameEW;
  644. _datas.customer = this.ewCustomer
  645. this.dialogDataList.push(_datas)
  646. this.printBig(1, this.radio)
  647. } else {
  648. this.dialogData.companyName = this.companyName
  649. if(this.dialogData&&!this.dialogData.customer&&this.dialogData.contractManagement){
  650. this.dialogData.customer = this.dialogData.contractManagement.buyer
  651. }
  652. this.dialogDataList.push(this.dialogData)
  653. this.printBig('', this.radio)
  654. }
  655. })
  656. .catch((response) => {})
  657. },
  658. outTypechange(e){
  659. console.log(e)
  660. if(e=='汽运'){
  661. if(this.carChange1 == '手动填写'){
  662. this.weighingList.selfLoading = '0'
  663. this.carjudge=false
  664. }else{
  665. this.weighingList.selfLoading = '1'
  666. this.carjudge=true
  667. }
  668. }else if(e=='散船'){
  669. this.carjudge=true
  670. this.weighingList.selfLoading = '0'
  671. }else if(e=='集装箱船'){
  672. this.carjudge=true
  673. this.weighingList.selfLoading = '0'
  674. }
  675. },
  676. typePrintCannelClick() {
  677. this.ddchecked = false,
  678. this.checked = false,
  679. this.dialogDataList = [] //打个打印取消时数组至空
  680. this.isShowPrintType = false
  681. },
  682. changeEw(e) {
  683. this.ddchecked = false
  684. if (e) {
  685. this.printSeparately = true
  686. } else {
  687. this.printSeparately = false
  688. }
  689. },
  690. changeEwDD(e) {
  691. this.checked = false
  692. if (e) {
  693. this.printSeparately = true
  694. } else {
  695. this.printSeparately = false
  696. }
  697. },
  698. addstocks(index) {
  699. this.stocks.push({
  700. warehouseName: '',
  701. cost: ''
  702. })
  703. },
  704. delstocks(index) {
  705. this.stocks.splice(index, 1)
  706. },
  707. refreshClick(type) {
  708. let that = this
  709. if (type == 1) {
  710. getweighingList({
  711. compId: localStorage.getItem('ws-pf_compId'),
  712. currentPage: that.currentPage,
  713. pageSize: that.pageSize,
  714. searchKeyWord: that.searchKeyWord,
  715. warehouseName: that.warehouseName,
  716. managementType: 3,
  717. statusType: that.statusType,
  718. // loadingstatus: 1,
  719. })
  720. .toPromise()
  721. .then((response) => {
  722. that.deliveryList = response.records
  723. that.deptBudgetTotal = response.total
  724. for (var i = 0; i < response.records.length; i++) {
  725. if (response.records[i].addressUrl != null) {
  726. if (response.records[i].addressUrl) {
  727. response.records[i].addressUrlArray =
  728. response.records[i].addressUrl.split(',')
  729. }
  730. } else {
  731. response.records[i].addressUrlArray = []
  732. }
  733. }
  734. for (var i = 0; i < response.records.length; i++) {
  735. var arr = new Array()
  736. that.addressUrls[i] = new Array()
  737. if (that.weighingList.records[i].addressUrl != null) {
  738. arr = that.weighingList.records[i].addressUrl.split(',')
  739. that.addressUrls[i] = arr
  740. }
  741. }
  742. })
  743. .catch((response) => {})
  744. } else {
  745. clearInterval(that.timer)
  746. that.refresh = 60
  747. that.timer = setInterval(function() {
  748. console.log(that.refresh)
  749. if (that.refresh == 0) {
  750. that.refresh = 60
  751. getweighingList({
  752. compId: localStorage.getItem('ws-pf_compId'),
  753. currentPage: that.currentPage,
  754. pageSize: that.pageSize,
  755. searchKeyWord: that.searchKeyWord,
  756. warehouseName: that.warehouseName,
  757. managementType: 3,
  758. statusType: that.statusType,
  759. loadingstatus: 1,
  760. })
  761. .toPromise()
  762. .then((response) => {
  763. that.deliveryList = response.records
  764. that.deptBudgetTotal = response.total
  765. for (var i = 0; i < response.records.length; i++) {
  766. if (response.records[i].addressUrl != null) {
  767. if (response.records[i].addressUrl) {
  768. response.records[i].addressUrlArray =
  769. response.records[i].addressUrl.split(',')
  770. }
  771. } else {
  772. response.records[i].addressUrlArray = []
  773. }
  774. }
  775. for (var i = 0; i < response.records.length; i++) {
  776. var arr = new Array()
  777. that.addressUrls[i] = new Array()
  778. if (that.weighingList.records[i].addressUrl != null) {
  779. arr = that.weighingList.records[i].addressUrl.split(',')
  780. that.addressUrls[i] = arr
  781. }
  782. }
  783. })
  784. .catch((response) => {})
  785. }
  786. that.refresh--
  787. }, 1000);
  788. }
  789. },
  790. statustypechangelist(status) {
  791. this.statusType = status
  792. this.getList()
  793. },
  794. getNowTime() {
  795. var now = new Date()
  796. var year = now.getFullYear() //得到年份
  797. var month = now.getMonth() //得到月份
  798. var date = now.getDate() //得到日期
  799. month = month + 1
  800. month = month.toString().padStart(2, '0')
  801. date = date.toString().padStart(2, '0')
  802. var defaultDate = `${year}-${month}-${date}`
  803. this.$set(this.weighingList, 'inOutDate', defaultDate)
  804. },
  805. record() {
  806. this.$router.push({
  807. path: 'weighingManagementrecord',
  808. query: {
  809. warehouseName: this.warehouseName
  810. },
  811. })
  812. },
  813. closePrint() {
  814. this.isShowPrint = false
  815. },
  816. printSmall() {
  817. // localStorage.setItem('inspect', JSON.stringify(this.inspect))
  818. // window.open('../../../static/weightChecknew.html?type=1')
  819. localStorage.setItem('ck_bd_printData1', JSON.stringify(this.inspect))
  820. window.open('../../../../static/outWeightPrint.html?type=1&other="true"')
  821. },
  822. printBig(type, radioType) {
  823. // localStorage.setItem('ck_bd_printData1',JSON.stringify(this.inspect))
  824. // window.open('../../../../static/outWeightPrint.html?type=2')
  825. // 打印额外
  826. localStorage.removeItem('print_out_data')
  827. localStorage.removeItem('selectPrint_EWjjSelectPrintList')
  828. localStorage.removeItem('selectPrint_jjSelectPrintList')
  829. if (this.checked || this.ddchecked) {
  830. this.makeEWjjSelectPrintList()
  831. // this.selectEW = true;
  832. }
  833. if (type == 1) {
  834. localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.dialogDataList))
  835. window.open('../../../../static/weightCheckOutNew.html?type=2&radioType=' + radioType + '&selectEW=' + this
  836. .checked + '&selectEWDD=' + this.ddchecked)
  837. } else if (type == 2) {
  838. localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.excelPrintData))
  839. window.open('../../../../static/weightCheckOutNew.html?type=2&radioType=' + radioType)
  840. } else {
  841. console.log(this.dialogDataList)
  842. localStorage.setItem('print_out_data',JSON.stringify(this.dialogDataList).replace(/%/g, 'baifenhao'))
  843. window.open('../../../../static/weightCheckOutNew.html?type=2' )
  844. }
  845. },
  846. makeEWjjSelectPrintList() {
  847. let _selectPrint_EWjjSelectPrintList = JSON.parse(JSON.stringify(this.dialogDataList));
  848. for (let i = 0; i < _selectPrint_EWjjSelectPrintList.length; i++) {
  849. let _data = _selectPrint_EWjjSelectPrintList[i];
  850. _data.compName = this.companyNameEW;
  851. _data.customer = this.ewCustomer
  852. }
  853. localStorage.setItem('selectPrint_EWjjSelectPrintList', JSON.stringify(_selectPrint_EWjjSelectPrintList))
  854. },
  855. opendBtn() {
  856. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  857. let dataURL = canvas.toDataURL('image/png')
  858. this.imgUrl = dataURL
  859. if (this.imgUrl !== '') {
  860. let b = this.dataURLtoFile(this.imgUrl, 'printImg')
  861. let formdata = new FormData()
  862. formdata.append('file', b)
  863. axios({
  864. method: 'post',
  865. url:this.global.uploadPath,
  866. data: formdata,
  867. }).then((response) => {
  868. //编辑接口
  869. this.weighingList.pictureAddress = response.data.url
  870. console.log(this.types)
  871. if (this.types == 3) {
  872. this.weighingList.flag = 0
  873. } else if (this.types == 4) {
  874. this.weighingList.flag = 1
  875. }
  876. if (this.tpyeNo == 1) {
  877. tareEdit(this.weighingList)
  878. .toPromise()
  879. .then((response) => {
  880. this.types = ''
  881. this.weighingList = {
  882. grossWeight: '',
  883. tare: '',
  884. tips: '',
  885. // contractNo:'',
  886. // inOutTaskNo:'',
  887. buckleMiscellaneous: 0,
  888. netWeight: 0,
  889. receivableWeighingFee: '',
  890. warehouseInOutDetail: {
  891. grade: '',
  892. imperfectGrain: '',
  893. impurity: '',
  894. jiaorenli: '',
  895. bulkDensity: '',
  896. mildewGrain: '',
  897. },
  898. qualityInspectionManagement: {
  899. boxNo: '暂无',
  900. boxNoOther: '暂无',
  901. titleNo: '暂无',
  902. titleNoOther: '暂无',
  903. },
  904. }
  905. // this.inspect = []
  906. })
  907. } else {
  908. grossWeight(this.weighingList)
  909. .toPromise()
  910. .then((response) => {
  911. this.types = ''
  912. this.weighingList = {
  913. grossWeight: '',
  914. tare: '',
  915. tips: '',
  916. // contractNo:'',
  917. // inOutTaskNo:'',
  918. buckleMiscellaneous: 0,
  919. netWeight: 0,
  920. receivableWeighingFee: '',
  921. warehouseInOutDetail: {
  922. grade: '',
  923. imperfectGrain: '',
  924. impurity: '',
  925. jiaorenli: '',
  926. bulkDensity: '',
  927. mildewGrain: '',
  928. },
  929. qualityInspectionManagement: {
  930. boxNo: '暂无',
  931. boxNoOther: '暂无',
  932. titleNo: '暂无',
  933. titleNoOther: '暂无',
  934. },
  935. }
  936. // this.inspect = []
  937. })
  938. }
  939. })
  940. }
  941. })
  942. },
  943. closeDialog() {
  944. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  945. let dataURL = canvas.toDataURL('image/png')
  946. this.imgUrl = dataURL
  947. if (this.imgUrl !== '') {
  948. let b = this.dataURLtoFile(this.imgUrl, 'printImg')
  949. let formdata = new FormData()
  950. formdata.append('file', b)
  951. axios({
  952. method: 'post',
  953. url:this.global.uploadPath,
  954. data: formdata,
  955. }).then((response) => {
  956. //编辑接口
  957. this.weighingList.pictureAddress = response.data.url
  958. console.log(this.types)
  959. if (this.types == 3) {
  960. this.weighingList.flag = 0
  961. } else if (this.types == 4) {
  962. this.weighingList.flag = 1
  963. }
  964. if (this.tpyeNo == 1) {
  965. tareEdit(this.weighingList)
  966. .toPromise()
  967. .then((response) => {
  968. this.types = ''
  969. this.weighingList = {
  970. grossWeight: '',
  971. tare: '',
  972. tips: '',
  973. // contractNo:'',
  974. // inOutTaskNo:'',
  975. buckleMiscellaneous: 0,
  976. netWeight: 0,
  977. receivableWeighingFee: '',
  978. warehouseInOutDetail: {
  979. grade: '',
  980. imperfectGrain: '',
  981. impurity: '',
  982. jiaorenli: '',
  983. bulkDensity: '',
  984. mildewGrain: '',
  985. },
  986. qualityInspectionManagement: {
  987. boxNo: '暂无',
  988. boxNoOther: '暂无',
  989. titleNo: '暂无',
  990. titleNoOther: '暂无',
  991. },
  992. }
  993. // this.inspect = []
  994. })
  995. } else {
  996. grossWeight(this.weighingList)
  997. .toPromise()
  998. .then((response) => {
  999. this.types = ''
  1000. this.weighingList = {
  1001. grossWeight: '',
  1002. tare: '',
  1003. tips: '',
  1004. // contractNo:'',
  1005. // inOutTaskNo:'',
  1006. buckleMiscellaneous: 0,
  1007. netWeight: 0,
  1008. receivableWeighingFee: '',
  1009. warehouseInOutDetail: {
  1010. grade: '',
  1011. imperfectGrain: '',
  1012. impurity: '',
  1013. jiaorenli: '',
  1014. bulkDensity: '',
  1015. mildewGrain: '',
  1016. },
  1017. qualityInspectionManagement: {
  1018. boxNo: '暂无',
  1019. boxNoOther: '暂无',
  1020. titleNo: '暂无',
  1021. titleNoOther: '暂无',
  1022. },
  1023. }
  1024. // this.inspect = []
  1025. })
  1026. }
  1027. })
  1028. this.dialogTableVisible = true
  1029. }
  1030. })
  1031. },
  1032. weightweight() {
  1033. if (this.tpyeNo == 1) {
  1034. this.weighingList.grossWeight = this.weighingList.weight
  1035. } else {
  1036. this.weighingList.tare = this.weighingList.weight
  1037. }
  1038. },
  1039. handleSizeChange(val) {
  1040. console.log(`每页 ${val} 条`)
  1041. this.pageSize = val
  1042. this.getList()
  1043. },
  1044. handleCurrentChange(val) {
  1045. this.currentPage = val
  1046. console.log(`当前页: ${val}`)
  1047. this.getList()
  1048. },
  1049. setVal(data) {
  1050. if (this.information == '毛重') {
  1051. this.weighingList.grossWeight = data
  1052. this.weighingList.netWeight = Number(this.weighingList.grossWeight) - Number(this.weighingList.tare)
  1053. } else {
  1054. this.weighingList.tare = data
  1055. }
  1056. },
  1057. openPort() {
  1058. this.$refs.weightChild.openPort()
  1059. },
  1060. listclick(row) {
  1061. this.id = row.id
  1062. getweighing({
  1063. id: row.id,
  1064. })
  1065. .toPromise()
  1066. .then((response) => {
  1067. this.weighingList = response
  1068. if(response.inOutType == '移库出库' && this.warehouseType == '1'){
  1069. this.recheckPrice = true
  1070. }else{
  1071. this.recheckPrice = false
  1072. }
  1073. // this.weighingList.carNo =
  1074. // response.qualityInspectionManagement.carNumber
  1075. this.$set(this.weighingList,'carNo', response.qualityInspectionManagement.carNumber)
  1076. this.weighingList.boxNo = response.boxNo
  1077. this.weighingList.boxNoOther = response.boxNoOther
  1078. this.weighingList.titleNo = response.titleNo
  1079. this.weighingList.titleNoOther = response.titleNoOther
  1080. this.weighingList.wingNumber =
  1081. response.qualityInspectionManagement.wingNumber
  1082. this.weighingList.wingNumberOther =
  1083. response.qualityInspectionManagement.wingNumberOther
  1084. this.weighingList.warehouseInOutDetail = {
  1085. grade: '',
  1086. imperfectGrain: '',
  1087. impurity: '',
  1088. jiaorenli: '',
  1089. bulkDensity: '',
  1090. mildewGrain: '',
  1091. }
  1092. })
  1093. // if(){
  1094. // }
  1095. // this.deptBudgetList=row
  1096. // console.log(row)
  1097. },
  1098. add() {
  1099. this.information = '皮重'
  1100. this.weighingList = {
  1101. grossWeight: 0,
  1102. tare: 0,
  1103. tips: '',
  1104. // contractNo:'',
  1105. // inOutTaskNo:'',
  1106. buckleMiscellaneous: 0,
  1107. netWeight: 0,
  1108. receivableWeighingFee: '',
  1109. warehouseInOutDetail: {
  1110. grade: '',
  1111. imperfectGrain: '',
  1112. impurity: '',
  1113. jiaorenli: '',
  1114. bulkDensity: '',
  1115. mildewGrain: '',
  1116. },
  1117. qualityInspectionManagement: {
  1118. boxNo: '暂无',
  1119. boxNoOther: '暂无',
  1120. titleNo: '暂无',
  1121. titleNoOther: '暂无',
  1122. },
  1123. }
  1124. },
  1125. deletelist() {
  1126. if (this.id) {
  1127. delelteWeighing({
  1128. id: this.id,
  1129. })
  1130. .toPromise()
  1131. .then((response) => {
  1132. this.$message({
  1133. message: '删除成功!',
  1134. type: 'success',
  1135. })
  1136. this.id = ''
  1137. this.weighingList = {
  1138. grossWeight: '',
  1139. tare: '',
  1140. tips: '',
  1141. // contractNo:'',
  1142. // inOutTaskNo:'',
  1143. buckleMiscellaneous: 0,
  1144. netWeight: 0,
  1145. receivableWeighingFee: '',
  1146. warehouseInOutDetail: {
  1147. grade: '',
  1148. imperfectGrain: '',
  1149. impurity: '',
  1150. jiaorenli: '',
  1151. bulkDensity: '',
  1152. mildewGrain: '',
  1153. },
  1154. qualityInspectionManagement: {
  1155. boxNo: '暂无',
  1156. boxNoOther: '暂无',
  1157. titleNo: '暂无',
  1158. titleNoOther: '暂无',
  1159. },
  1160. }
  1161. this.getList()
  1162. })
  1163. }
  1164. },
  1165. binNumberchange(e) {
  1166. for (let i = 0; i < this.positionInfos.length; i++) {
  1167. if (this.positionInfos[i].binNumber == e) {
  1168. this.weighingList.positionId = this.positionInfos[i].id
  1169. }
  1170. }
  1171. },
  1172. check(name, type) {
  1173. if (type == 1) {
  1174. for (var _tmp = 0; _tmp < this.ewCustomerOptions.length; _tmp++) {
  1175. if (this.ewCustomerOptions[_tmp].label == name) {
  1176. return false
  1177. }
  1178. }
  1179. return true
  1180. } else if (type == 2) {
  1181. for (var _tmp = 0; _tmp < this.companyNameEWOptions.length; _tmp++) {
  1182. if (this.companyNameEWOptions[_tmp].label == name) {
  1183. return false
  1184. }
  1185. }
  1186. return true
  1187. }
  1188. },
  1189. print() {
  1190. this.weighingList.warehouseType = this.warehouseType
  1191. console.log(this.weighingList,this.weighingList.binNumbe ,this.weighingList.warehouseType)
  1192. this.carjudge=false
  1193. this.carChange1 = '手动填写'
  1194. // if(this.tpyeNo==2){
  1195. // if(this.weighingList.qualityInspectionManagement.status != '已质检'){
  1196. // this.$message.error("该条信息未质检!")
  1197. // return
  1198. // }
  1199. // }
  1200. // for (var i = 0; i < this.outContractNo.length; i++) {
  1201. // if (this.outContractNo[i].contractNo == this.weighingList.contractNo){
  1202. // this.$set(this.weighingList,'customer',this.outContractNo[i].buyer)
  1203. // }
  1204. // }debugger
  1205. // console.log(this.weighingList.customer)
  1206. this.weighingList.carNumber = this.weighingList.carNo
  1207. if (this.tpyeNo == 1 || this.tpyeNo == 2) {
  1208. if (!this.weighingList.contractNo) {
  1209. this.$message({
  1210. message: '合同编号不能为空',
  1211. type: 'warning',
  1212. })
  1213. return
  1214. }
  1215. if (!this.weighingList.binNumber && this.weighingList.warehouseType == 1) {
  1216. this.$message({
  1217. message: '仓位号不能为空',
  1218. type: 'warning',
  1219. })
  1220. return
  1221. }
  1222. // if (!this.weighingList.storageNumber) {
  1223. // this.$message({
  1224. // message: '囤位号不能为空',
  1225. // type: 'warning',
  1226. // })
  1227. // return
  1228. // }
  1229. if (!this.weighingList.contractPrice && this.weighingList.inOutType != '移库出库'
  1230. ||this.weighingList.inOutType == '移库出库'&&this.weighingList.priceType=='随行就市'&&this.weighingList.warehouseType==2) {
  1231. this.$message({
  1232. message: '价格不能为空',
  1233. type: 'warning',
  1234. })
  1235. return
  1236. }
  1237. if (
  1238. this.weighingList.storageNumber&&this.weighingList.storageNumber.length < 1 ||
  1239. this.weighingList.storageNumber&&this.weighingList.storageNumber.length > 10
  1240. ) {
  1241. this.$message({
  1242. message: '囤位号不超过10个字符!',
  1243. type: 'warning',
  1244. })
  1245. return
  1246. }
  1247. if (!this.weighingList.carNumber) {
  1248. this.$message({
  1249. message: '车牌号不能为空',
  1250. type: 'warning',
  1251. })
  1252. return
  1253. }
  1254. if (this.weighingList.carNumber.length != 7) {
  1255. this.$message({
  1256. message: '车牌号输入错误',
  1257. type: 'warning',
  1258. })
  1259. return
  1260. }
  1261. if (!this.weighingList.inOutType) {
  1262. this.$message({
  1263. message: '出库类型不能为空',
  1264. type: 'warning',
  1265. })
  1266. return
  1267. }
  1268. }
  1269. if (!this.weighingList.binNumber&& this.weighingList.warehouseType == 1) {
  1270. this.$message({
  1271. message: '仓位号不能为空',
  1272. type: 'warning',
  1273. })
  1274. return
  1275. }
  1276. if (this.tpyeNo == 1) {
  1277. if (!this.weighingList.inOutType) {
  1278. this.$message({
  1279. message: '出库类型不能为空',
  1280. type: 'warning',
  1281. })
  1282. return
  1283. }
  1284. if (!this.weighingList.tare) {
  1285. this.$message({
  1286. message: '皮重不能为空',
  1287. type: 'warning',
  1288. })
  1289. return
  1290. }
  1291. if (
  1292. isNaN(this.weighingList.tare) ||
  1293. (String(this.weighingList.tare).indexOf('.') != -1 &&
  1294. String(this.weighingList.tare).length -
  1295. (String(this.weighingList.tare).indexOf('.') + 1) >
  1296. 1) ||
  1297. this.weighingList.tare < 1 ||
  1298. this.weighingList.tare > 100000
  1299. ) {
  1300. this.$message({
  1301. message: '皮重输入错误!',
  1302. type: 'warning',
  1303. })
  1304. return
  1305. }
  1306. }
  1307. if (this.tpyeNo == 2) {
  1308. if (!this.weighingList.grossWeight) {
  1309. this.$message({
  1310. message: '毛重不能为空',
  1311. type: 'warning',
  1312. })
  1313. return
  1314. }
  1315. if (
  1316. isNaN(this.weighingList.grossWeight) ||
  1317. (String(this.weighingList.grossWeight).indexOf('.') != -1 &&
  1318. String(this.weighingList.grossWeight).length -
  1319. (String(this.weighingList.grossWeight).indexOf('.') + 1) >
  1320. 1) ||
  1321. this.weighingList.grossWeight < 1 ||
  1322. this.weighingList.grossWeight > 120000
  1323. ) {3
  1324. this.$message({
  1325. message: '毛重输入错误!',
  1326. type: 'warning',
  1327. })
  1328. return
  1329. }
  1330. if (this.weighingList.netWeight < 0) {
  1331. this.$message({
  1332. message: '净重不能为负',
  1333. type: 'warning',
  1334. })
  1335. return
  1336. }
  1337. }
  1338. this.weighingList.compId = localStorage.getItem('ws-pf_compId')
  1339. this.weighingList.warehouseName = this.warehouseName
  1340. this.$confirm('确定保存检斤信息?', '提示', {
  1341. confirmButtonText: '确定',
  1342. cancelButtonText: '取消',
  1343. type: 'warning',
  1344. })
  1345. .then(() => {
  1346. this.weighingList.inOutFlag = 1
  1347. this.weighingList.statusFlag = 3
  1348. // if (this.weighingList.grossWeight) {
  1349. // this.weighingList.grossWeight = this.weighingList.grossWeight / 1000
  1350. // }
  1351. // if (this.weighingList.netWeight) {
  1352. // this.weighingList.netWeight = this.weighingList.netWeight / 1000
  1353. // }
  1354. // this.weighingList.tare = this.weighingList.tare / 1000
  1355. // if (this.weighingList.buckleMiscellaneous) {
  1356. // this.weighingList.buckleMiscellaneous = this.weighingList.buckleMiscellaneous / 1000
  1357. // }
  1358. if (this.tpyeNo == 1) {
  1359. this.deptBudgetList.skinInspector =
  1360. localStorage.getItem('ws-pf_staffName')
  1361. // this.weighingList.serviceManagementType=2
  1362. this.weighingList.statusFlag = 1
  1363. this.weighingList.relationId = this.relationId
  1364. this.weighingList.warehouseId = this.warehouseId
  1365. this.weighingList.baseId = this.warehouseId
  1366. this.weighingList.skinInspector =
  1367. localStorage.getItem('ws-pf_staffName')
  1368. if (this.weighingList.id) { //修改皮重
  1369. var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
  1370. weighingList1.id = this.weighingList.warehouseInOutId
  1371. weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
  1372. weighingList1.weighingManagement = this.weighingList
  1373. if (weighingList1.tare) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
  1374. weighingList1.tare = weighingList1.tare / 1000
  1375. }
  1376. if (weighingList1.netWeight) {
  1377. weighingList1.netWeight = weighingList1.netWeight / 1000
  1378. }
  1379. newSubmit(weighingList1)
  1380. .toPromise()
  1381. .then((response) => {
  1382. getweighing({
  1383. id: this.weighingList.id
  1384. })
  1385. .toPromise().then((response) => {
  1386. if (this.reader) {
  1387. this.reader.cancel()
  1388. }
  1389. this.$notify({
  1390. title: '成功',
  1391. message: '提交成功',
  1392. type: 'success',
  1393. })
  1394. this.getList()
  1395. this.weighingList = response
  1396. // this.warehouseCount = Number(this.warehouseCount) + 1
  1397. // this.warehouseCount1 = Number(this.warehouseCount1) + 1
  1398. this.inspect = JSON.parse(
  1399. JSON.stringify(this.weighingList)
  1400. )
  1401. // this.isShowPrint = true
  1402. this.isShowPrintType = true
  1403. this.weighingList = {
  1404. grossWeight: 0,
  1405. tare: 0,
  1406. tips: '',
  1407. // contractNo:'',
  1408. // inOutTaskNo:'',
  1409. buckleMiscellaneous: 0,
  1410. netWeight: 0,
  1411. receivableWeighingFee: '',
  1412. warehouseInOutDetail: {
  1413. grade: '',
  1414. imperfectGrain: '',
  1415. impurity: '',
  1416. jiaorenli: '',
  1417. bulkDensity: '',
  1418. mildewGrain: '',
  1419. },
  1420. qualityInspectionManagement: {
  1421. boxNo: '暂无',
  1422. boxNoOther: '暂无',
  1423. titleNo: '暂无',
  1424. titleNoOther: '暂无',
  1425. },
  1426. }
  1427. })
  1428. })
  1429. } else { //新增皮检信息
  1430. this.weighingList.relationId = this.relationId
  1431. this.weighingList.warehouseId = this.warehouseId
  1432. this.weighingList.baseId = this.warehouseId
  1433. this.weighingList.warehouseNo = this.warehouseNo
  1434. var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
  1435. weighingList1.id = this.weighingList.warehouseInOutId
  1436. weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
  1437. weighingList1.weighingManagement = this.weighingList
  1438. if (weighingList1.tare) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
  1439. weighingList1.tare = weighingList1.tare / 1000
  1440. }
  1441. if (weighingList1.netWeight) {
  1442. weighingList1.netWeight = weighingList1.netWeight / 1000
  1443. }
  1444. newSubmit(weighingList1)
  1445. .toPromise()
  1446. .then((response) => {
  1447. this.idPrint=response
  1448. getweighing({
  1449. id: response
  1450. })
  1451. .toPromise().then((response) => {
  1452. if (this.reader) {
  1453. this.reader.cancel()
  1454. }
  1455. this.$notify({
  1456. title: '成功',
  1457. message: '提交成功',
  1458. type: 'success',
  1459. })
  1460. this.getList()
  1461. this.weighingList = response
  1462. // this.warehouseCount = Number(this.warehouseCount) + 1
  1463. // this.warehouseCount1 = Number(this.warehouseCount1) + 1
  1464. this.inspect = JSON.parse(
  1465. JSON.stringify(this.weighingList)
  1466. )
  1467. if(this.warehouseName == '鲅鱼圈金信库' ||
  1468. this
  1469. .warehouseName == '哈尔滨依兰库' || this
  1470. .warehouseName == '白城内陆港'|| this
  1471. .warehouseName == '山东园丰库'){
  1472. if(this.weighingList.contractManagement){
  1473. let cang = {}
  1474. cang.value = this.weighingList.contractManagement.seller
  1475. cang.label = this.weighingList.contractManagement.seller
  1476. if (this.check(this.weighingList.contractManagement.seller, 1)) {
  1477. this.ewCustomerOptions.push(cang)
  1478. }
  1479. let cang1 = {}
  1480. cang1.value = this.weighingList.contractManagement.buyer
  1481. cang1.label = this.weighingList.contractManagement.buyer
  1482. if (this.check(this.weighingList.contractManagement.buyer, 2)) {
  1483. this.companyNameEWOptions.push(cang1)
  1484. }
  1485. this.myCompanyCustomer = this.weighingList.contractManagement.buyer
  1486. }
  1487. this.isShowPrintType = true
  1488. }else{
  1489. this.isShowPrintType = true
  1490. }
  1491. this.weighingList = {
  1492. grossWeight: 0,
  1493. tare: 0,
  1494. tips: '',
  1495. // contractNo:'',
  1496. // inOutTaskNo:'',
  1497. buckleMiscellaneous: 0,
  1498. netWeight: 0,
  1499. receivableWeighingFee: '',
  1500. warehouseInOutDetail: {
  1501. grade: '',
  1502. imperfectGrain: '',
  1503. impurity: '',
  1504. jiaorenli: '',
  1505. bulkDensity: '',
  1506. mildewGrain: '',
  1507. },
  1508. qualityInspectionManagement: {
  1509. boxNo: '暂无',
  1510. boxNoOther: '暂无',
  1511. titleNo: '暂无',
  1512. titleNoOther: '暂无',
  1513. },
  1514. }
  1515. })
  1516. })
  1517. }
  1518. } else if (this.tpyeNo == 2) {
  1519. this.weighingList.secretaryWeigher =
  1520. localStorage.getItem('ws-pf_staffName')
  1521. this.weighingList.warehouseId = this.warehouseId
  1522. this.weighingList.baseId = this.warehouseId
  1523. var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
  1524. weighingList1.id = this.weighingList.warehouseInOutId
  1525. weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
  1526. console.log(this.weighingList)
  1527. if(this.weighingList.inOutType=='移库出库'){
  1528. this.weighingList.customer=this.weighingList.tips
  1529. }
  1530. weighingList1.weighingManagement = this.weighingList
  1531. if (weighingList1.grossWeight) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
  1532. weighingList1.grossWeight = weighingList1.grossWeight / 1000
  1533. }
  1534. if (weighingList1.netWeight) {
  1535. weighingList1.netWeight = weighingList1.netWeight / 1000
  1536. }
  1537. if (weighingList1.tare) {
  1538. weighingList1.tare = weighingList1.tare / 1000
  1539. }
  1540. newSubmit(weighingList1)
  1541. .toPromise()
  1542. .then((response) => {
  1543. this.idPrint=response
  1544. getweighing({
  1545. id: response
  1546. })
  1547. .toPromise().then((response) => {
  1548. if(this.warehouseName == '鲅鱼圈金信库' ||
  1549. this
  1550. .warehouseName == '哈尔滨依兰库' || this
  1551. .warehouseName == '白城内陆港'|| this
  1552. .warehouseName == '山东园丰库'){
  1553. this.weighingList = response
  1554. this.inspect = JSON.parse(
  1555. JSON.stringify(this.weighingList)
  1556. )
  1557. if(this.weighingList.contractManagement){
  1558. let cang = {}
  1559. cang.value = this.weighingList.contractManagement.seller
  1560. cang.label = this.weighingList.contractManagement.seller
  1561. if (this.check(this.weighingList.contractManagement.seller, 1)) {
  1562. this.ewCustomerOptions.push(cang)
  1563. }
  1564. let cang1 = {}
  1565. cang1.value = this.weighingList.contractManagement.buyer
  1566. cang1.label = this.weighingList.contractManagement.buyer
  1567. if (this.check(this.weighingList.contractManagement.buyer, 2)) {
  1568. this.companyNameEWOptions.push(cang1)
  1569. }
  1570. this.myCompanyCustomer = this.weighingList.contractManagement.buyer
  1571. }
  1572. this.isShowPrintType = true
  1573. }else{
  1574. this.isShowPrintType = true
  1575. }
  1576. })
  1577. if (this.reader) {
  1578. this.reader.cancel()
  1579. }
  1580. // this.$notify.success({
  1581. // title: '成功',
  1582. // message: '提交成功',
  1583. // })
  1584. this.$notify({
  1585. title: '成功',
  1586. message: '提交成功',
  1587. type: 'success',
  1588. })
  1589. this.inspect = JSON.parse(JSON.stringify(this.weighingList))
  1590. // this.isShowPrint = true
  1591. this.weighingList = {
  1592. grossWeight: 0,
  1593. selfLoading: 0,
  1594. tare: 0,
  1595. tips: '',
  1596. // contractNo:'',
  1597. // inOutTaskNo:'',
  1598. buckleMiscellaneous: 0,
  1599. netWeight: 0,
  1600. receivableWeighingFee: '',
  1601. warehouseInOutDetail: {
  1602. grade: '',
  1603. imperfectGrain: '',
  1604. impurity: '',
  1605. jiaorenli: '',
  1606. bulkDensity: '',
  1607. mildewGrain: '',
  1608. },
  1609. qualityInspectionManagement: {
  1610. boxNo: '暂无',
  1611. boxNoOther: '暂无',
  1612. titleNo: '暂无',
  1613. titleNoOther: '暂无',
  1614. },
  1615. }
  1616. this.getList()
  1617. })
  1618. // addstorageputList(weighingList1)
  1619. // .toPromise()
  1620. // .then((response) => {
  1621. // this.weighingList.grossWeight =
  1622. // this.weighingList.grossWeight * 1000
  1623. // this.weighingList.tare = this.weighingList.tare * 1000
  1624. // this.weighingList.netWeight =
  1625. // this.weighingList.netWeight * 1000
  1626. // this.weighingList.buckleMiscellaneous =
  1627. // this.weighingList.buckleMiscellaneous * 1000
  1628. // this.weighingList.warehouseInOutId = response
  1629. // grossWeight(this.weighingList)
  1630. // .toPromise()
  1631. // .then((response) => {
  1632. // getweighing({
  1633. // id: response
  1634. // })
  1635. // .toPromise()
  1636. // .then((response) => {
  1637. // this.weighingList = response
  1638. // this.inspect = JSON.parse(
  1639. // JSON.stringify(this.weighingList)
  1640. // )
  1641. // this.isShowPrint = true
  1642. // })
  1643. // if (this.reader) {
  1644. // this.reader.cancel()
  1645. // }
  1646. // // this.$notify.success({
  1647. // // title: '成功',
  1648. // // message: '提交成功',
  1649. // // })
  1650. // this.$notify({
  1651. // title: '成功',
  1652. // message: '提交成功',
  1653. // type: 'success',
  1654. // })
  1655. // this.inspect = JSON.parse(JSON.stringify(this.weighingList))
  1656. // this.isShowPrint = true
  1657. // this.weighingList = {
  1658. // grossWeight: 0,
  1659. // selfLoading: 0,
  1660. // tare: 0,
  1661. // tips: '',
  1662. // // contractNo:'',
  1663. // // inOutTaskNo:'',
  1664. // buckleMiscellaneous: 0,
  1665. // netWeight: 0,
  1666. // receivableWeighingFee: '',
  1667. // warehouseInOutDetail: {
  1668. // grade: '',
  1669. // imperfectGrain: '',
  1670. // impurity: '',
  1671. // jiaorenli: '',
  1672. // bulkDensity: '',
  1673. // mildewGrain: '',
  1674. // },
  1675. // qualityInspectionManagement: {
  1676. // boxNo: '暂无',
  1677. // boxNoOther: '暂无',
  1678. // titleNo: '暂无',
  1679. // titleNoOther: '暂无',
  1680. // },
  1681. // }
  1682. // this.getList()
  1683. // })
  1684. // })
  1685. // .catch((response) => {})
  1686. }
  1687. })
  1688. .catch(() => {
  1689. return false
  1690. })
  1691. },
  1692. carNoTypeChange() {
  1693. this.carjudge = !this.carjudge
  1694. if (this.carjudge) {
  1695. this.weighingList.selfLoading = '1'
  1696. this.carChange1 = '识别下拉'
  1697. } else {
  1698. this.weighingList.selfLoading = '0'
  1699. this.carChange1 = '手动填写'
  1700. }
  1701. },
  1702. tabClick(val) {
  1703. this.weighingList = {
  1704. grossWeight: '',
  1705. tare: '',
  1706. tips: '',
  1707. buckleMiscellaneous: 0,
  1708. netWeight: 0,
  1709. receivableWeighingFee: '',
  1710. warehouseInOutDetail: {
  1711. grade: '',
  1712. imperfectGrain: '',
  1713. impurity: '',
  1714. jiaorenli: '',
  1715. bulkDensity: '',
  1716. mildewGrain: '',
  1717. },
  1718. qualityInspectionManagement: {
  1719. boxNo: '暂无',
  1720. boxNoOther: '暂无',
  1721. titleNo: '暂无',
  1722. titleNoOther: '暂无',
  1723. },
  1724. }
  1725. this.index = val
  1726. // this.disabled=true
  1727. if (val == 0) {
  1728. this.statusType = '3'
  1729. this.information = '皮重'
  1730. this.tpyeNo = '1'
  1731. this.recheck1 = false
  1732. } else {
  1733. this.statusType = 3
  1734. this.tpyeNo = '2'
  1735. this.information = '毛重'
  1736. this.recheck1 = true
  1737. }
  1738. this.getList()
  1739. },
  1740. warehouseNameChange(e) {
  1741. for (let i = 0; i < this.warehouseList.length; i++) {
  1742. if (this.warehouseList[i].value == e) {
  1743. this.warehouseId = this.warehouseList[i].warehouseId
  1744. // this.warehouseCount = this.warehouseList[i].ouCount
  1745. }
  1746. }
  1747. for (let i = 0; i < this.warehouseList1.length; i++) {
  1748. if (this.warehouseList1[i].warehouseName == e) {
  1749. localStorage.setItem(
  1750. 'houseSelfCollect_house1',
  1751. JSON.stringify({
  1752. No: this.warehouseList1[i].commonWarehouseNo,
  1753. allowEdit: this.warehouseList1[i].allowEdit,
  1754. value: this.warehouseList1[i].warehouseName,
  1755. count: this.warehouseList1[i].count,
  1756. warehouseId: this.warehouseList1[i].id,
  1757. })
  1758. )
  1759. if (this.warehouseList1[i].allowEdit == 1) {
  1760. this.disabled = false
  1761. } else {
  1762. this.disabled = true
  1763. }
  1764. this.positionInfos = this.warehouseList1[i].positionInfos
  1765. this.warehouseCount = this.warehouseList1[i].outCount
  1766. this.warehouseNo = this.warehouseList1[i].commonWarehouseNo
  1767. this.warehouseType = this.warehouseList1[i].warehouseType
  1768. }
  1769. }
  1770. this.getList()
  1771. this.weighingList = {
  1772. grossWeight: 0,
  1773. selfLoading: 0,
  1774. tare: 0,
  1775. tips: '',
  1776. // contractNo:'',
  1777. // inOutTaskNo:'',
  1778. buckleMiscellaneous: 0,
  1779. netWeight: 0,
  1780. receivableWeighingFee: '',
  1781. warehouseInOutDetail: {
  1782. grade: '',
  1783. imperfectGrain: '',
  1784. impurity: '',
  1785. jiaorenli: '',
  1786. bulkDensity: '',
  1787. mildewGrain: '',
  1788. },
  1789. qualityInspectionManagement: {
  1790. boxNo: '暂无',
  1791. boxNoOther: '暂无',
  1792. titleNo: '暂无',
  1793. titleNoOther: '暂无',
  1794. },
  1795. }
  1796. },
  1797. // async openPort() {
  1798. // console.log('openPort', navigator)
  1799. // if ('serial' in navigator) {
  1800. // // if (!this.$store.state.app.reader) {
  1801. // // The Web Serial API is supported.
  1802. // console.log('the Web Serial API is supported.')
  1803. // console.log(this.param)
  1804. // const port = await navigator.serial.requestPort()
  1805. // await port.open({
  1806. // baudRate: this.param,
  1807. // }) // set baud rate
  1808. // this.reader = port.readable.getReader()
  1809. // console.log('beforeReader', port)
  1810. // console.log('beforeReader', this.reader)
  1811. // this.$store.dispatch('app/setReader', this.reader)
  1812. // // } else {
  1813. // // console.log('afterport', this.$store.state.app.reader)
  1814. // // this.reader = this.$store.state.app.reader
  1815. // // }
  1816. // // 监听来自串行设备的数据
  1817. // while (true) {
  1818. // const {
  1819. // value,
  1820. // done
  1821. // } = await this.reader.read()
  1822. // // console.log("value",value);
  1823. // if (done) {
  1824. // // 允许稍后关闭串口。
  1825. // this.reader.releaseLock()
  1826. // break
  1827. // }
  1828. // var result = ''
  1829. // //2。获取16进制字符串
  1830. // // var receData = HexConvert.ByteToString(value);
  1831. // // console.log("receData",receData);
  1832. // var flag = false
  1833. // // for(var i=0;i<value.length;i++){
  1834. // // var tmp = String.fromCharCode(value[i])
  1835. // // if(tmp == '+'){
  1836. // // flag = true
  1837. // // }
  1838. // // if(flag && result.length <6 && tmp != '+'){
  1839. // // result += tmp
  1840. // // }
  1841. // // }
  1842. // // if(this.tpyeNo != 2){
  1843. // // this.weighingList.grossWeight = parseInt(result)
  1844. // // }
  1845. // // else{
  1846. // // this.weighingList.tare = parseInt(result)
  1847. // // }
  1848. // if (
  1849. // (this.warehouseName &&
  1850. // (this.warehouseName == '山东诸城迈饶库' ||
  1851. // this.warehouseName == '克东千红库')) ||
  1852. // this.warehouseName == '鲅鱼圈祥腾库' ||
  1853. // this.warehouseName == '哈尔滨依兰库' ||
  1854. // this.warehouseName == '龙江金信库'
  1855. // ) {
  1856. // for (var i = 0; i < value.length; i++) {
  1857. // var tmp = String.fromCharCode(value[i])
  1858. // if (tmp == '+') {
  1859. // flag = true
  1860. // }
  1861. // if (flag && result.length < 6 && tmp != '+') {
  1862. // result += tmp
  1863. // }
  1864. // }
  1865. // if (this.tpyeNo != 2) {
  1866. // if (parseInt(result) || parseInt(result) == 0) {
  1867. // this.weighingList.weight = parseInt(result)
  1868. // }
  1869. // } else {
  1870. // if (parseInt(result) || parseInt(result) == 0) {
  1871. // this.weighingList.weight = parseInt(result)
  1872. // }
  1873. // }
  1874. // } else if (
  1875. // this.warehouseName &&
  1876. // (this.warehouseName == '顺诚粮库' ||
  1877. // this.warehouseName == '鲅鱼圈金信库')
  1878. // ) {
  1879. // for (var i = value.length - 1; i >= 0; i--) {
  1880. // var tmp = String.fromCharCode(value[i])
  1881. // console.log(tmp)
  1882. // if (String.fromCharCode(value[0]) == '.') {
  1883. // flag = true
  1884. // }
  1885. // if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
  1886. // result += tmp
  1887. // }
  1888. // }
  1889. // if (this.tpyeNo != 2) {
  1890. // if (parseInt(result) || parseInt(result) == 0) {
  1891. // this.weighingList.weight = parseInt(result)
  1892. // }
  1893. // } else {
  1894. // if (parseInt(result) || parseInt(result) == 0) {
  1895. // this.weighingList.weight = parseInt(result)
  1896. // }
  1897. // }
  1898. // } else {
  1899. // for (var i = 0; i < value.length; i++) {
  1900. // var tmp = String.fromCharCode(value[i])
  1901. // if (value[0] != 49 && value[0] != 2) {
  1902. // break
  1903. // }
  1904. // if (tmp == String.fromCharCode(32)) {
  1905. // flag = true
  1906. // }
  1907. // if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
  1908. // // if(i-1 >=0 &&tmp == String.fromCharCode(48) && value[i-1] == 32){
  1909. // // continue
  1910. // // }
  1911. // // if(i-2 >=0 &&tmp == String.fromCharCode(48) && value[i-2] == 32){
  1912. // // continue
  1913. // // }
  1914. // result += tmp
  1915. // }
  1916. // }
  1917. // if (this.tpyeNo != 2) {
  1918. // if (parseInt(result) || parseInt(result) == 0) {
  1919. // this.weighingList.weight = parseInt(result) * 100
  1920. // }
  1921. // } else {
  1922. // if (parseInt(result) || parseInt(result) == 0) {
  1923. // this.weighingList.weight = parseInt(result) * 100
  1924. // }
  1925. // }
  1926. // }
  1927. // // setTimeout(1000)
  1928. // // value 是一个 Uint8Array
  1929. // }
  1930. // await port.close()
  1931. // } else {
  1932. // console.log('the Web Serial API is not supported.', navigator)
  1933. // }
  1934. // },
  1935. find() {
  1936. this.getList()
  1937. },
  1938. calculation() {
  1939. if (this.weighingList.grossWeight && this.weighingList.tare) {
  1940. let count = 0
  1941. this.weighingList.netWeight =
  1942. this.weighingList.grossWeight -
  1943. this.weighingList.tare -
  1944. Number(
  1945. this.weighingList.buckleMiscellaneous ?
  1946. this.weighingList.buckleMiscellaneous :
  1947. 0
  1948. )
  1949. }
  1950. },
  1951. carChange(e) {
  1952. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  1953. if (this.tranCarInfoList[i].carNo == this.weighingList.carNo) {
  1954. this.weighingList.carNumber = this.tranCarInfoList[i].carNo
  1955. this.weighingList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  1956. this.weighingList.freight = this.tranCarInfoList[i].tranPrice
  1957. this.weighingList.carId = this.tranCarInfoList[i].id
  1958. }
  1959. }
  1960. },
  1961. fleetNameChange(e){
  1962. console.log(e,this.fleetNameList)
  1963. if(e=='非车队'){
  1964. this.carjudge=false
  1965. this.weighingList.selfLoading = '0'
  1966. this.carChange1 = '手动填写'
  1967. }else{
  1968. for (let i = 0; i < this.fleetNameList.length; i++) {
  1969. if (this.fleetNameList[i].carNo == this.weighingList.fleetName) {
  1970. this.weighingList.freight = this.fleetNameList[i].tranPrice
  1971. this.carjudge=true
  1972. if (this.carjudge) {
  1973. this.weighingList.selfLoading = '1'
  1974. this.carChange1 = '识别下拉'
  1975. } else {
  1976. this.weighingList.selfLoading = '0'
  1977. this.carChange1 = '手动填写'
  1978. }
  1979. this.$forceUpdate()
  1980. }
  1981. }
  1982. }
  1983. },
  1984. // 获取当前年月日
  1985. getTime() {
  1986. var date = new Date()
  1987. var mouth = date.getMonth() + 1
  1988. var day = date.getDate()
  1989. if (mouth < 10) {
  1990. mouth = '0' + mouth
  1991. }
  1992. if (day < 10) {
  1993. day = '0' + day
  1994. }
  1995. return date.getFullYear() + mouth + day
  1996. },
  1997. contractNoChange(e) {
  1998. this.weighingList={
  1999. grossWeight: '',
  2000. tare: '',
  2001. buckleMiscellaneous: 0,
  2002. netWeight: 0,
  2003. weight: '',
  2004. tips: '',
  2005. carNo:'',
  2006. // contractNo:'',
  2007. // inOutTaskNo:'',
  2008. receivableWeighingFee: '',
  2009. warehouseInOutDetail: {
  2010. grade: '',
  2011. imperfectGrain: '',
  2012. impurity: '',
  2013. jiaorenli: '',
  2014. bulkDensity: '',
  2015. mildewGrain: '',
  2016. },
  2017. qualityInspectionManagement: {
  2018. boxNo: '暂无',
  2019. boxNoOther: '暂无',
  2020. titleNo: '暂无',
  2021. titleNoOther: '暂无',
  2022. },
  2023. inOutDate: ''
  2024. }
  2025. this.getNowTime()
  2026. this.weighingList.inOutTaskNo=e
  2027. this.warehouseCount = this.warehouseCount1
  2028. var data = null
  2029. for (let i = 0; i < this.taskNolist.length; i++) {
  2030. if (this.taskNolist[i].inOutTaskNo == e) {
  2031. this.weighingList.donecount=this.taskNolist[i].completedQuantity+'/'+this.taskNolist[i].weight
  2032. // this.weighingList.number = this.taskNolist[i].inOutTaskNo
  2033. // this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
  2034. this.weighingList.numberLetter = 'XSCK'
  2035. this.weighingList.goodsName = this.taskNolist[i].goodsName
  2036. this.weighingList.tips = this.taskNolist[i].businessDescribe
  2037. data = this.taskNolist[i]
  2038. console.log(data,11111111111)
  2039. if(this.taskNolist[i].inOutType=='移库出库'){
  2040. this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
  2041. gettask({contractNo:this.taskNolist[i].moveTaskNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
  2042. // console.log(response)
  2043. if(!response){
  2044. this.$message({
  2045. message: '联系内勤创建运输任务',
  2046. type: 'warning',
  2047. });
  2048. }
  2049. })
  2050. this.carjudge=false
  2051. if(this.warehouseType == '1'){
  2052. this.recheckPrice = true
  2053. }else{
  2054. this.recheckPrice = false
  2055. }
  2056. if (this.carjudge) {
  2057. this.weighingList.selfLoading = '1'
  2058. this.carChange1 = '识别下拉'
  2059. } else {
  2060. this.weighingList.selfLoading = '0'
  2061. this.carChange1 = '手动填写'
  2062. }
  2063. }else{
  2064. this.carjudge=true
  2065. if (this.taskNolist[i].contractNo) {
  2066. // console.log(this.taskNolist[i])
  2067. this.weighingList.contractNo = this.taskNolist[i].contractNo
  2068. } else {
  2069. this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
  2070. }
  2071. this.recheckPrice = false
  2072. }
  2073. if (this.carjudge) {
  2074. this.weighingList.selfLoading = '1'
  2075. this.carChange1 = '识别下拉'
  2076. } else {
  2077. this.weighingList.selfLoading = '0'
  2078. this.carChange1 = '手动填写'
  2079. }
  2080. }
  2081. }
  2082. // if (!data) return
  2083. for (var i = 0; i < this.outContractNo.length; i++) {
  2084. if (this.outContractNo[i].contractNo == this.weighingList.contractNo) {
  2085. this.shipInfoList=this.outContractNo[i].shipInfoList
  2086. this.weighingList.goodsName = this.outContractNo[i].goodsName
  2087. if (this.weighingList.goodsName == '玉米(潮粮)') {
  2088. this.weighingList.type = '潮粮'
  2089. } else {
  2090. this.weighingList.type = '干粮'
  2091. }
  2092. console.log(this.outContractNo[i],12222)
  2093. // this.weighingList.contractPrice = this.outContractNo[i].unitContractPrice
  2094. this.$set(this.weighingList,'contractPrice',this.outContractNo[i].unitContractPrice)
  2095. this.$set(this.weighingList,'customer',this.outContractNo[i].buyer)
  2096. this.weighingList.goodsNameKey = this.outContractNo[i].goodsNameKey
  2097. this.weighingList.grade = this.outContractNo[i].grade
  2098. this.weighingList.inOutType = this.outContractNo[i].inOutType
  2099. if (this.outContractNo[i].inOutType == '销售出库') {
  2100. if(this.outContractNo[i].deliverType==1){
  2101. gettask({contractNo:this.outContractNo[i].contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
  2102. // console.log(response)
  2103. if(!response){
  2104. this.$message({
  2105. message: '联系内勤创建运输任务',
  2106. type: 'warning',
  2107. });
  2108. }
  2109. })
  2110. }
  2111. if(this.outContractNo[i].priceType=='随行就市'){
  2112. this.priceedit=false
  2113. }else if(this.outContractNo[i].priceType=='定价销售'){
  2114. this.priceedit=false
  2115. }{
  2116. }
  2117. this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
  2118. this.weighingList.numberLetter = 'XSCK'
  2119. this.weighingList.buyer = this.outContractNo[i].buyer
  2120. this.weighingList.seller = localStorage.getItem('ws-pf_compName')
  2121. if (!this.outContractNo[i].unitContractPrice) {
  2122. this.weighingList.tips = '买方' + this.outContractNo[i].buyer
  2123. } else {
  2124. this.weighingList.tips =
  2125. '买方' +
  2126. this.outContractNo[i].buyer +
  2127. '( ' +
  2128. this.outContractNo[i].unitContractPrice +
  2129. '元/吨)'
  2130. }
  2131. this.weighingList.inOutTypeKey = 1
  2132. } else if (this.outContractNo[i].inOutType == '移库出库') {
  2133. for (let q = 0; q < this.warehouseList1.length; q++) {
  2134. if (this.warehouseList1[q].warehouseName == this.warehouseName) {
  2135. if(this.warehouseList1[q].warehouseType==2&&this.warehouseList1[q].createType==1&&this.outContractNo[i].priceType=='定价采购'){
  2136. // console.log(this.outContractNo[i].contractPrice,11111111111)
  2137. this.priceedit=true
  2138. this.weighingList.contractPrice=this.outContractNo[i].contractPrice
  2139. }
  2140. if(this.warehouseList1[q].warehouseType==2&&this.warehouseList1[q].createType==1&&this.outContractNo[i].priceType=='随行就市'){
  2141. this.priceedit=false
  2142. }
  2143. if(this.warehouseList1[q].warehouseType==1){
  2144. this.priceedit=true
  2145. }
  2146. }
  2147. }
  2148. this.weighingList.priceType=this.outContractNo[i].priceType
  2149. this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
  2150. this.weighingList.numberLetter = 'YKCK'
  2151. this.weighingList.buyer = this.outContractNo[i].receiveWarehouse
  2152. this.weighingList.seller = this.outContractNo[i].sendWarehouse
  2153. this.weighingList.goodsName = data == null?'玉米':data.goodsName
  2154. this.weighingList.goodsNameKey = data == null?'1':data.goodsNameKey
  2155. this.weighingList.grade = data == null?'二等品':data.grade
  2156. if (this.outContractNo[i].unitContractPrice) {
  2157. this.weighingList.tips =
  2158. '入货库' +
  2159. data == null?'':data.receiveWarehouse +
  2160. '( ' +
  2161. this.outContractNo[i].unitContractPrice +
  2162. '元/吨)'
  2163. } else {
  2164. this.weighingList.tips = '入货库' + data == null?'':data.receiveWarehouse
  2165. }
  2166. this.weighingList.inOutTypeKey = 3
  2167. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  2168. this.weighingList.inOutTypeKey = 4
  2169. } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
  2170. this.weighingList.inOutTypeKey = 5
  2171. } else if (this.outContractNo[i].inOutType == '采购出库') {
  2172. this.weighingList.inOutTypeKey = 6
  2173. }
  2174. if (this.outContractNo[i].deliverType == '1') {
  2175. this.carjudge = false
  2176. } else {
  2177. this.carjudge = true
  2178. }
  2179. if (this.outContractNo[i].tranCarInfoList) {
  2180. this.options2 = this.outContractNo[i].tranCarInfoList
  2181. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  2182. this.carjudge = false
  2183. }else{
  2184. this.options2 = []
  2185. this.tranCarInfoList = []
  2186. }
  2187. if (this.outContractNo[i].tranCarInfoList1) {
  2188. this.fleetNameList = this.outContractNo[i].tranCarInfoList1
  2189. }else{
  2190. this.fleetNameList = []
  2191. }
  2192. if (this.carjudge) {
  2193. this.weighingList.selfLoading = '1'
  2194. this.carChange1 = '识别下拉'
  2195. } else {
  2196. this.weighingList.selfLoading = '0'
  2197. this.carChange1 = '手动填写'
  2198. }
  2199. }
  2200. }
  2201. },
  2202. selectWarehouse() {
  2203. selectWarehouseSelf({
  2204. compId: localStorage.getItem('ws-pf_compId'),
  2205. })
  2206. .toPromise()
  2207. .then((response) => {
  2208. this.warehouseList = []
  2209. for (let i = 0; i < response.length; i++) {
  2210. this.warehouseList.push({
  2211. value: response[i].warehouseName,
  2212. warehouseId: response[i].id,
  2213. })
  2214. }
  2215. let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
  2216. _wareHouse = JSON.parse(_wareHouse)
  2217. for (let i = 0; i < response.length; i++) {
  2218. if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
  2219. this.warehouseName = response[i].warehouseName
  2220. this.warehouseId = response[i].id
  2221. this.positionInfos = response[i].positionInfos
  2222. this.warehouseCount = response[i].outCount
  2223. this.warehouseCount1 = response[i].outCount
  2224. this.warehouseNo = response[i].commonWarehouseNo
  2225. this.warehouseType = response[i].warehouseType
  2226. if (response[i].allowEdit == 1) {
  2227. this.disabled = false
  2228. } else {
  2229. this.disabled = true
  2230. }
  2231. }
  2232. if (!_wareHouse) {
  2233. this.warehouseName = this.warehouseList[0].value
  2234. this.warehouseId = this.warehouseList[0].warehouseId
  2235. this.positionInfos = response[0].positionInfos
  2236. this.warehouseCount = response[0].outCount
  2237. this.warehouseCount1 = response[0].outCount
  2238. this.warehouseNo = response[0].commonWarehouseNo
  2239. this.warehouseType = response[0].warehouseType
  2240. if (response[0].allowEdit == 1) {
  2241. this.disabled = false
  2242. } else {
  2243. this.disabled = true
  2244. }
  2245. console.log()
  2246. }
  2247. }
  2248. this.warehouseList1 = response
  2249. this.deptBudgetList.warehouseName = this.warehouseName
  2250. this.getList()
  2251. })
  2252. },
  2253. getList() {
  2254. pullDown({
  2255. constId: 'CON6',
  2256. })
  2257. .toPromise()
  2258. .then((response) => {
  2259. this.storageType = response
  2260. })
  2261. getReceiptTaskNo({
  2262. flag: 1,
  2263. warehouseName: this.warehouseName,
  2264. agentKey: localStorage.getItem('ws-pf_userId'),
  2265. })
  2266. .toPromise()
  2267. .then((response) => {
  2268. this.taskNolist = response
  2269. })
  2270. //合同编号
  2271. xialaNo({
  2272. compId: localStorage.getItem('ws-pf_compId'),
  2273. loadingstatus: 1,
  2274. flag: 5,
  2275. })
  2276. .toPromise()
  2277. .then((response) => {
  2278. this.outContractNo = response
  2279. })
  2280. // this.refreshClick(1)
  2281. getweighingList({
  2282. compId: localStorage.getItem('ws-pf_compId'),
  2283. currentPage: this.currentPage,
  2284. pageSize: this.pageSize,
  2285. searchKeyWord: this.searchKeyWord,
  2286. warehouseName: this.warehouseName,
  2287. managementType: 3,
  2288. statusType: this.statusType,
  2289. })
  2290. .toPromise()
  2291. .then((response) => {
  2292. this.deliveryList = response.records
  2293. this.deptBudgetTotal = response.total
  2294. for (var i = 0; i < response.records.length; i++) {
  2295. if (response.records[i].addressUrl != null) {
  2296. if (response.records[i].addressUrl) {
  2297. response.records[i].addressUrlArray =
  2298. response.records[i].addressUrl.split(',')
  2299. }
  2300. } else {
  2301. response.records[i].addressUrlArray = []
  2302. }
  2303. }
  2304. for (var i = 0; i < response.records.length; i++) {
  2305. var arr = new Array()
  2306. this.addressUrls[i] = new Array()
  2307. if (this.weighingList.records[i].addressUrl != null) {
  2308. arr = this.weighingList.records[i].addressUrl.split(',')
  2309. this.addressUrls[i] = arr
  2310. }
  2311. }
  2312. })
  2313. .catch((response) => {})
  2314. },
  2315. },
  2316. }
  2317. </script>
  2318. <style lang="scss" scoped>
  2319. .center {
  2320. background: #fff;
  2321. }
  2322. .size_css {
  2323. width: 540px;
  2324. min-width: 540px;
  2325. overflow-x: scroll;
  2326. position: relative;
  2327. }
  2328. .ws-info-table {
  2329. border: none;
  2330. }
  2331. .base_header_layout {
  2332. padding: 10px;
  2333. margin-bottom: 10px;
  2334. }
  2335. .ws-info-table .el-form-item {
  2336. width: 50%;
  2337. border: none;
  2338. }
  2339. .formItem {
  2340. width: 100%;
  2341. display: inline;
  2342. }
  2343. .ws-info-table {
  2344. border: none;
  2345. }
  2346. .ws-info-table .el-form-item {
  2347. width: 100%;
  2348. border: none;
  2349. }
  2350. /deep/.ws-info-table .el-form-item .el-form-item__label {
  2351. width: 30%;
  2352. text-align: center;
  2353. background: #ffffff;
  2354. color: #8890b1;
  2355. }
  2356. /deep/.ws-info-table .el-form-item .el-form-item__content {
  2357. border: none;
  2358. }
  2359. /deep/.el-textarea__inner {
  2360. width: 92%;
  2361. }
  2362. /deep/.ws-info-table .el-form-item.rememo .el-form-item__content {
  2363. height: 76px;
  2364. }
  2365. .title {
  2366. font-size: 16px;
  2367. font-weight: 600;
  2368. margin: 10px;
  2369. }
  2370. .titleup {
  2371. position: relative;
  2372. }
  2373. .title::before {
  2374. content: '';
  2375. display: inline-block;
  2376. width: 5px;
  2377. height: 15px;
  2378. background: #8890b1;
  2379. margin-right: 5px;
  2380. }
  2381. .substance {
  2382. background: #ffffff;
  2383. width: 100%;
  2384. border-radius: 4px;
  2385. margin: 0 auto;
  2386. padding-top: 20px;
  2387. }
  2388. /deep/.el-table .el-table__header .cell,
  2389. .el-table .el-table__body .cell {
  2390. text-align: center;
  2391. }
  2392. /deep/.el-table--enable-row-transition .el-table__body td {
  2393. text-align: center;
  2394. }
  2395. .bg-left {
  2396. padding-left: 30px;
  2397. }
  2398. .bg-right {
  2399. padding-right: 10px;
  2400. text-align: right;
  2401. }
  2402. .bg-bottom {
  2403. margin: 15px 0px;
  2404. }
  2405. .titleup {
  2406. position: relative;
  2407. }
  2408. /deep/ .substance .bangdan {
  2409. width: 100%;
  2410. padding-top: 6%;
  2411. padding-bottom: 6%;
  2412. }
  2413. // // .photo2{
  2414. // // margin-top: 10px;
  2415. // // }
  2416. .el-upload--picture-card {
  2417. background-color: #fbfdff;
  2418. border: 1px dashed #c0ccda;
  2419. border-radius: 6px;
  2420. box-sizing: border-box;
  2421. width: 148px;
  2422. height: 148px;
  2423. line-height: 146px;
  2424. vertical-align: top;
  2425. margin-left: -289px;
  2426. }
  2427. // .titleup::before {
  2428. // content: '';
  2429. // display: inline-block;
  2430. // width: 5px;
  2431. // height: 30px;
  2432. // background: #5473e8;
  2433. // position: absolute;
  2434. // left: 0;
  2435. // }
  2436. .but {
  2437. text-align: center;
  2438. margin: 20px auto;
  2439. }
  2440. .stocks {
  2441. position: relative;
  2442. /deep/.el-select>.el-input {
  2443. display: inline-block;
  2444. }
  2445. /deep/>.el-input {
  2446. width: 33.3333%;
  2447. }
  2448. .add,
  2449. .del {
  2450. position: absolute;
  2451. right: -16px;
  2452. transform: translateY(20%);
  2453. }
  2454. .del {
  2455. right: -40px;
  2456. }
  2457. }
  2458. .butCss {
  2459. opacity: 0;
  2460. color: #000;
  2461. }
  2462. .center {
  2463. overflow-y: scroll;
  2464. }
  2465. .el-button--success.is-plain {
  2466. border: 1px solid #2aff7c;
  2467. background: black;
  2468. color: #2aff7c;
  2469. width: 50%;
  2470. }
  2471. .call-show {
  2472. width: 540px;
  2473. }
  2474. .top {
  2475. background: black;
  2476. color: #2aff7c;
  2477. font-size: 32px;
  2478. text-align: right;
  2479. padding: 0 10px 0 20px;
  2480. border-radius: 10px;
  2481. margin: 0 20px 20px 21px;
  2482. position: absolute;
  2483. top: 140px;
  2484. width: 465px;
  2485. .zujian {
  2486. position: relative;
  2487. }
  2488. .kg-style {
  2489. font-size: 30px;
  2490. color: red;
  2491. }
  2492. .confirmInfo {
  2493. display: flex;
  2494. // line-height: 90px;
  2495. .car-type {
  2496. text-align: left;
  2497. width: 50%;
  2498. min-width: 200px;
  2499. }
  2500. .car-no {
  2501. width: 50%;
  2502. text-align: right;
  2503. }
  2504. }
  2505. .confirmWeight {
  2506. display: flex;
  2507. align-items: center;
  2508. .titleWeight {
  2509. width: 35%;
  2510. min-width: 200px;
  2511. text-align: left;
  2512. line-height: 90px;
  2513. color: red;
  2514. }
  2515. .weight {
  2516. width: 65%;
  2517. text-align: right;
  2518. color: red;
  2519. }
  2520. }
  2521. }
  2522. .bottom {
  2523. // text-align: center;
  2524. background: white;
  2525. margin: 20px 20px 0 20px;
  2526. // border-radius: 10px;
  2527. padding-bottom: 20px;
  2528. .img1,
  2529. .img2 {
  2530. width: 200px;
  2531. padding: 20px;
  2532. }
  2533. .video-content {
  2534. width: 100%;
  2535. }
  2536. .video1 {
  2537. text-align: center;
  2538. }
  2539. }
  2540. /deep/.title_css .el-dialog__header {
  2541. text-align: center !important;
  2542. }
  2543. .mask {
  2544. background: black;
  2545. width: 100vw;
  2546. height: 100vh;
  2547. position: fixed;
  2548. top: 0;
  2549. z-index: 99;
  2550. opacity: 0.3;
  2551. }
  2552. .print-type-title {
  2553. text-align: center;
  2554. font-size: 18px;
  2555. margin: 20px;
  2556. }
  2557. .bottom-btn {
  2558. display: flex;
  2559. margin-top: 20px;
  2560. justify-content: space-around;
  2561. }
  2562. .print-type-checkbox {
  2563. // padding-left: 20px;
  2564. }
  2565. .print-type {
  2566. position: absolute;
  2567. top: 0;
  2568. bottom: 0;
  2569. left: 0;
  2570. right: 0;
  2571. margin: auto;
  2572. width: 440px;
  2573. height: 320px;
  2574. background: white;
  2575. border-radius: 10px;
  2576. z-index: 100;
  2577. }
  2578. /deep/.el-radio-group {
  2579. width: 100%;
  2580. display: flex;
  2581. }
  2582. /deep/.el-radio__label {
  2583. font-size: 20px;
  2584. }
  2585. /deep/.el-radio__inner {
  2586. // background: red;
  2587. height: 20px;
  2588. width: 20px;
  2589. }
  2590. .label-width {
  2591. width: 100%;
  2592. text-align: center;
  2593. font-size: 20px;
  2594. }
  2595. .show-excel {
  2596. opacity: 0;
  2597. }
  2598. /deep/.base_header_layout .find.el-button--primary {
  2599. width: 30px;
  2600. border-top-left-radius: 0px;
  2601. border-bottom-left-radius: 0px;
  2602. }
  2603. /deep/.base_header_layout .findinput input {
  2604. border-top-right-radius: 0px;
  2605. border-bottom-right-radius: 0px;
  2606. }
  2607. .ew-print {
  2608. padding: 0 20px;
  2609. margin-top: 10px;
  2610. margin-bottom: 15px;
  2611. // display: flex;
  2612. // justify-content: space-between;
  2613. // align-content: center;
  2614. .row {
  2615. display: flex;
  2616. margin-top: 10px;
  2617. align-items: center;
  2618. }
  2619. }
  2620. .sh-address {
  2621. display: flex;
  2622. }
  2623. .print-type-ew {
  2624. display: flex;
  2625. justify-content: space-between;
  2626. padding: 0 20px;
  2627. /deep/.el-radio__label {
  2628. font-size: 14px;
  2629. }
  2630. margin-top: 10px;
  2631. }
  2632. /deep/.el-table .cell {
  2633. text-align: center;
  2634. }
  2635. .shdw-style {
  2636. display: flex;
  2637. justify-content: space-between;
  2638. align-items: center;
  2639. padding: 0 20px;
  2640. margin-top: 20px;
  2641. }
  2642. // /deep/.el-table__body .current-row td:first-child {
  2643. // border-left: 4px solid #2aff7c;
  2644. // // border-bottom: 1px solid #2aff7c ;
  2645. // }
  2646. // /deep/.el-table__body .current-row td:last-child {
  2647. // border-right: 4px solid #2aff7c;
  2648. // // border-bottom: 1px solid #2aff7c ;
  2649. // }
  2650. </style>