weighingManagementNew.vue 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190
  1. <template>
  2. <div class="center">
  3. <BaseHeaderLayout :leftSpan="12">
  4. <template slot="left">
  5. </template>
  6. <template slot="right">
  7. <el-select 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.tips" placeholder="自动获取,不可编辑" maxlength="100" disabled
  102. size="small" />
  103. </ws-form-item>
  104. <ws-form-item label="货名" span="1" prop="goodsName">
  105. <ws-input v-model="weighingList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled
  106. size="small" />
  107. </ws-form-item>
  108. <ws-form-item v-if="tpyeNo == 1 && warehouseType == 1" label="仓位号" span="1" prop="inOutTaskNo">
  109. <el-select @change="binNumberchange" :disabled="recheck" filterable clearable
  110. v-model="weighingList.binNumber" placeholder="请选择仓位号" class="typeselect">
  111. <el-option v-for="item in positionInfos" :key="item.id" :label="item.binNumber"
  112. :value="item.binNumber" />
  113. </el-select>
  114. </ws-form-item>
  115. <ws-form-item v-if="tpyeNo == 1 && warehouseType == 1" label="囤位号" span="1" prop="storageNumber">
  116. <ws-input :disabled="recheck" v-model="weighingList.storageNumber" placeholder="选填,1-10个字符"
  117. maxlength="10" size="small" />
  118. </ws-form-item>
  119. <ws-form-item label="价格" span="1" prop="contractPrice">
  120. <ws-input :disabled="recheck" v-model="weighingList.contractPrice" placeholder="请输入价格(元/吨)"
  121. maxlength="10" size="small" />
  122. </ws-form-item>
  123. <ws-form-item v-if="tpyeNo == 2" label="备注" span="1" prop="customer">
  124. <ws-input :disabled="recheck" v-model="weighingList.customer" placeholder="请输入备注"
  125. maxlength="10" size="small" />
  126. </ws-form-item>
  127. <ws-form-item v-if="tpyeNo == 1" label="出库类型" span="1">
  128. <ws-input v-model="weighingList.inOutType" class="right-bottom" disabled
  129. placeholder="自动获取,不可编辑" />
  130. <!-- :disabled="isSelectType" -->
  131. </ws-form-item>
  132. <ws-form-item v-if="tpyeNo == 1" label="出库日期" span="1" prop="inOutDate" class="deliverydate">
  133. <ws-date-picker v-model="weighingList.inOutDate" type="date" placeholder="请选择出库日期"
  134. value-format="yyyy-MM-dd" />
  135. </ws-form-item>
  136. <ws-form-item label="运输方式" span="1" prop="outType">
  137. <el-select v-model="weighingList.outType" placeholder="请选择运输方式" :disabled="recheck1">
  138. <el-option v-for="item in multiSelector" :key="item.value" :label="item.name"
  139. :value="item.name" />
  140. </el-select>
  141. </ws-form-item>
  142. <ws-form-item v-if="fleetNameList.length > 0 && tpyeNo == 1" label="车队" span="1" prop="fleetName">
  143. <el-select :disabled="recheck" v-model="deptBudgetList.fleet" placeholder="非车队车辆">
  144. <el-option v-for="item in fleetNameList" :key="item.value" :label="item.fleetName"
  145. :value="item.fleetName" />
  146. </el-select>
  147. </ws-form-item>
  148. <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
  149. weighingList.outType == '汽运' ||
  150. weighingList.outType == '集装箱船'
  151. ">
  152. <el-input v-if="!carstatus || carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
  153. size="small" :disabled="recheck1"/>
  154. <el-select v-else filterable clearable v-model="weighingList.carNo" placeholder="请选择车牌号"
  155. class="typeselect" @change="carChange" :disabled="recheck1">
  156. <el-option v-for="item in options2" :key="item.constKey"
  157. :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
  158. </el-select>
  159. <el-button type="primary" @click="carNoTypeChange" v-if="carstatus">{{ carChange1 }}</el-button>
  160. </ws-form-item>
  161. <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
  162. weighingList.outType == '汽运' ||
  163. weighingList.outType == '集装箱船'
  164. ">
  165. <ws-input v-model="weighingList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" :disabled="recheck1"/>
  166. </ws-form-item>
  167. <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
  168. weighingList.outType == '汽运' ||
  169. weighingList.outType == '集装箱船'
  170. ">
  171. <ws-input v-model="weighingList.titleNo" placeholder="请输入封号" maxlength="20" size="small" :disabled="recheck1"/>
  172. </ws-form-item>
  173. <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
  174. weighingList.outType == '汽运' ||
  175. weighingList.outType == '集装箱船'
  176. ">
  177. <ws-input v-model="weighingList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" :disabled="recheck1"/>
  178. </ws-form-item>
  179. <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
  180. weighingList.outType == '汽运' ||
  181. weighingList.outType == '集装箱船'
  182. ">
  183. <ws-input v-model="weighingList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" :disabled="recheck1"/>
  184. </ws-form-item>
  185. <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="weighingList.outType == '火运'">
  186. <ws-input v-model="weighingList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
  187. </ws-form-item>
  188. <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="weighingList.outType == '火运'">
  189. <ws-input v-model="weighingList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
  190. size="small" />
  191. </ws-form-item>
  192. <ws-form-item label="船名" span="1" prop="shipName" v-if="weighingList.outType == '散船'">
  193. <ws-input v-model="weighingList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
  194. </ws-form-item>
  195. <ws-form-item label="航次" span="1" prop="shipNumber" v-if="weighingList.outType == '散船'">
  196. <ws-input v-model="weighingList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
  197. </ws-form-item>
  198. <ws-form-item v-if="tpyeNo == 2" label="毛重(KG)" span="1" prop="grossWeight">
  199. <ws-input type="number" @mousewheel.native.prevent v-if="tpyeNo == 2"
  200. v-model="weighingList.grossWeight" @input="calculation" placeholder="未获取到毛重" maxlength="100"
  201. size="small" :disabled="disabled" />
  202. <el-button v-if="tpyeNo == 2 && warehouseType == 1" @click="openPort">重新获取</el-button>
  203. <el-button v-if="tpyeNo == 2 && warehouseType == 2" @click="disabled = false">编辑</el-button>
  204. </ws-form-item>
  205. <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '毛重'">
  206. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare"
  207. @input="calculation" placeholder="未获取到皮重" maxlength="100" size="small" disabled />
  208. </ws-form-item>
  209. <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '皮重'">
  210. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare"
  211. @input="calculation" placeholder="未获取到皮重" maxlength="100" size="small" :disabled="disabled" />
  212. <el-button v-if="tpyeNo == 1 && warehouseType == 1" @click="openPort">重新获取</el-button>
  213. <el-button v-if="tpyeNo == 1 && warehouseType == 2" @click="disabled = false">编辑</el-button>
  214. </ws-form-item>
  215. <div class="formItem">
  216. <!-- <ws-form-item label="扣重(KG)" span="1" prop="buckleMiscellaneous" v-if="
  217. information == '毛重' &&
  218. (paramType == '2' || inWarehouseType == 1)
  219. ">
  220. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous"
  221. @input="calculation" placeholder="请输入扣重" maxlength="100" size="small" />
  222. </ws-form-item> -->
  223. <ws-form-item label="净重(KG)" span="1" prop="netWeight" v-if="information == '毛重'">
  224. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight"
  225. placeholder="自动计算,不可编辑" maxlength="100" size="small" disabled />
  226. </ws-form-item>
  227. <!-- <ws-form-item label="应收卸车过磅费(元)" span="1" prop="receivableWeighingFee" v-if="index == 1">
  228. <ws-input type="number" v-model="weighingList.receivableWeighingFee" placeholder="未获取到卸车过磅费金额"
  229. maxlength="100" size="small" disabled />
  230. </ws-form-item>
  231. <ws-form-item label="实收卸车过磅费(元)" span="1" prop="actualWeighingFee" v-if="index == 1">
  232. <ws-input type="number" v-model="weighingList.actualWeighingFee" placeholder="输入卸车过磅费" maxlength="100"
  233. size="small" />
  234. </ws-form-item> -->
  235. </div>
  236. </ws-info-table>
  237. <div class="but">
  238. <!-- <el-button @click="print" type="primary" :disabled="submitAllow">提交</el-button> -->
  239. <el-button @click="print" v-if="information == '毛重'" type="primary">提交</el-button>
  240. <el-button @click="print" v-if="information == '皮重'" type="primary" :disabled="submitAllow">提交
  241. </el-button>
  242. </div>
  243. <!-- <div>
  244. <div>粮源</div>
  245. <div class='stocks' v-for='(item,index) in stocks'>
  246. <el-select v-model="item.warehouseName" filterable placeholder="选择所属仓库" @change="warehouseNameChange" :value="searchType">
  247. <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  248. style="color: #8890b1" />
  249. </el-select>
  250. <el-select v-model="item.warehouseName" filterable placeholder="选择货名" @change="warehouseNameChange" :value="searchType">
  251. <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  252. style="color: #8890b1" />
  253. </el-select>
  254. <ws-input v-model="item.cost" placeholder="输入重量" maxlength="100"
  255. size="small" />
  256. <img class='add' @click='addstocks(index)' style='width:20px;height:20px;' src="../../../public/img/add.png" alt="">
  257. <img class='del' @click='delstocks(index)' style='width:20px;height:20px;' src="../../../public/img/del.png" alt="">
  258. </div>
  259. </div> -->
  260. <!-- </div> -->
  261. </div>
  262. </div>
  263. </ws-form>
  264. </div>
  265. </el-col>
  266. <el-col :span="12">
  267. <div class="list-info">
  268. <div style="justify-content: space-between;" class="flex">
  269. <div style="min-width:146px;">
  270. <el-button v-if="tpyeNo == 1" @click="add" type="primary">新增</el-button>
  271. <el-button v-if="tpyeNo == 1" @click="deletelist" type="danger">删除</el-button>
  272. <el-button v-if="tpyeNo == 2" @click="statustypechangelist(3)"
  273. :type="statusType == 3 ? 'primary' : ''">未称毛重
  274. </el-button>
  275. <el-button v-if="tpyeNo == 2" @click="statustypechangelist(2)"
  276. :type="statusType == 2 ? 'primary' : ''">已称毛重
  277. </el-button>
  278. </div>
  279. <div style="display: flex;">
  280. <el-button @click='refreshClick(1)' type="primary">刷新</el-button>
  281. <el-button @click='refreshClick' type="primary">{{timer?refresh:'自动刷新'}}</el-button>
  282. <el-button @click="record" type="primary">记录</el-button>
  283. </div>
  284. </div>
  285. <el-table @cell-click="listclick" :data="deliveryList" style="width: 100%; margin-top: 20px"
  286. ref="deliveryList" border>
  287. <el-table-column prop="number" width="120" label="业务编号"></el-table-column>
  288. <el-table-column prop="carNumber" label="车牌号"></el-table-column>
  289. <el-table-column prop="status" label="状态"></el-table-column>
  290. </el-table>
  291. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  292. :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
  293. :total="deptBudgetTotal">
  294. </el-pagination>
  295. </div>
  296. </el-col>
  297. </el-row>
  298. </div>
  299. </div>
  300. <!-- @opened="opendBtn" -->
  301. <el-dialog width="70%" class="title_css" center :visible.sync="isShowPrint" title="出库检斤单" @close="closeDialog"
  302. :close-on-click-modal="false">
  303. <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
  304. <div style="text-align: center">
  305. <el-button type="primary" @click="closePrint">关闭</el-button>
  306. <el-button type="primary" @click="printSmall">打印小票</el-button>
  307. <el-button type="primary" @click="printBig">打印单据</el-button>
  308. </div>
  309. </el-dialog>
  310. </div>
  311. </template>
  312. <script>
  313. import {
  314. grossWeight,
  315. getbinNumber,
  316. contractListWeighing,
  317. tareAdd,
  318. tareEdit,
  319. getweighing,
  320. getweighingList,
  321. selectWarehouseSelf,
  322. delelteWeighing,
  323. newSubmit,
  324. getInfo
  325. } from '@/model/outboundManagement/index'
  326. import {
  327. pullDown,
  328. addstorageputList,
  329. xialaNo,
  330. getstaff,
  331. getReceiptTaskNo,
  332. } from '@/model/warehouse/index'
  333. import axios from 'axios'
  334. import weightCheckPrint from './component/weightCheckPrint.vue'
  335. import inspectInfoPrint from './component/inspectInfoPrint.vue'
  336. import html2canvas from 'html2canvas'
  337. import WsUpload from '@/components/WsUpload'
  338. import BalanceAlert from '@/components/balanceAlert'
  339. import {
  340. EventBus
  341. } from 'base-core-lib'
  342. export default {
  343. components: {
  344. WsUpload,
  345. inspectInfoPrint,
  346. weightCheckPrint,
  347. BalanceAlert
  348. },
  349. data() {
  350. return {
  351. timer: '',
  352. refresh: 60,
  353. isShowBalance: false,
  354. isShowPrint: false,
  355. warehouseName: '',
  356. warehouseList: [],
  357. warehouseList1: [],
  358. currentPage: 1,
  359. pageSize: 50,
  360. submitAllow: false,
  361. deliveryList: [],
  362. inOutTypeList:[],
  363. positionInfos: [],
  364. searchKeyWord: '',
  365. paramType: '',
  366. deptBudgetTotal: 0,
  367. monitorUrl1: '',
  368. monitorUrl2: '',
  369. index: 0,
  370. inspect: {},
  371. stocks: [{
  372. warehouseName: '',
  373. weight: '',
  374. cost: ''
  375. }],
  376. id: 0,
  377. options2: [],
  378. isSelectType: false,
  379. recheck: false,
  380. recheck1:false,
  381. recheckPrice:false,
  382. disabled: true,
  383. pListTop: [],
  384. tpyeNo: 1,
  385. types: null,
  386. information: '皮重',
  387. carChange1: '手动填写',
  388. inWarehouseType: 1, //入库类型
  389. outContractNo: [],
  390. mListTop: [],
  391. searchType: '',
  392. taskNolist: [],
  393. storageType: [],
  394. fleetNameList: [],
  395. carstatus: false,
  396. carjudge: false,
  397. warehouseCount: '',
  398. warehouseCount1: 0,
  399. warehouseNo: '',
  400. statusType: '3',
  401. warehouseType: 1,
  402. weighingList: {
  403. grossWeight: '',
  404. tare: '',
  405. buckleMiscellaneous: 0,
  406. netWeight: 0,
  407. weight: '',
  408. tips: '',
  409. carNo:'1231321',
  410. // contractNo:'',
  411. // inOutTaskNo:'',
  412. receivableWeighingFee: '',
  413. warehouseInOutDetail: {
  414. grade: '',
  415. imperfectGrain: '',
  416. impurity: '',
  417. jiaorenli: '',
  418. bulkDensity: '',
  419. mildewGrain: '',
  420. },
  421. qualityInspectionManagement: {
  422. boxNo: '暂无',
  423. boxNoOther: '暂无',
  424. titleNo: '暂无',
  425. titleNoOther: '暂无',
  426. },
  427. inOutDate: ''
  428. },
  429. carWeightInfo: {
  430. carNumber: '',
  431. type: '',
  432. weight: '',
  433. },
  434. deptBudgetList: {},
  435. multiSelector: [{
  436. name: '汽运',
  437. value: '0',
  438. },
  439. {
  440. name: '火运',
  441. value: '1',
  442. },
  443. {
  444. name: '集装箱船',
  445. value: '2',
  446. },
  447. {
  448. name: '散船',
  449. value: '3',
  450. },
  451. ],
  452. }
  453. },
  454. beforeDestroy() {
  455. if (this.timer) { //如果定时器还在运行 或者直接关闭,不用判断
  456. clearInterval(this.timer); //关闭
  457. }
  458. },
  459. mounted() {
  460. this.getNowTime()
  461. this.selectWarehouse()
  462. this.showType = this.isShow
  463. this.isShowBalance = true
  464. this.openPort()
  465. if (localStorage.getItem('houseSelfCollect_house1')) {
  466. if (localStorage.getItem('houseSelfCollect_house1').allowEdit == 1) {
  467. this.disabled = false
  468. } else {
  469. this.disabled = true
  470. }
  471. }
  472. },
  473. activated() {},
  474. methods: {
  475. addstocks(index) {
  476. this.stocks.push({
  477. warehouseName: '',
  478. cost: ''
  479. })
  480. },
  481. delstocks(index) {
  482. this.stocks.splice(index, 1)
  483. },
  484. refreshClick(type) {
  485. let that = this
  486. if (type == 1) {
  487. getweighingList({
  488. compId: localStorage.getItem('ws-pf_compId'),
  489. currentPage: that.currentPage,
  490. pageSize: that.pageSize,
  491. searchKeyWord: that.searchKeyWord,
  492. warehouseName: that.warehouseName,
  493. managementType: 3,
  494. statusType: that.statusType,
  495. // loadingstatus: 1,
  496. })
  497. .toPromise()
  498. .then((response) => {
  499. that.deliveryList = response.records
  500. that.deptBudgetTotal = response.total
  501. for (var i = 0; i < response.records.length; i++) {
  502. if (response.records[i].addressUrl != null) {
  503. if (response.records[i].addressUrl) {
  504. response.records[i].addressUrlArray =
  505. response.records[i].addressUrl.split(',')
  506. }
  507. } else {
  508. response.records[i].addressUrlArray = []
  509. }
  510. }
  511. for (var i = 0; i < response.records.length; i++) {
  512. var arr = new Array()
  513. that.addressUrls[i] = new Array()
  514. if (that.weighingList.records[i].addressUrl != null) {
  515. arr = that.weighingList.records[i].addressUrl.split(',')
  516. that.addressUrls[i] = arr
  517. }
  518. }
  519. })
  520. .catch((response) => {})
  521. } else {
  522. clearInterval(that.timer)
  523. that.refresh = 60
  524. that.timer = setInterval(function() {
  525. console.log(that.refresh)
  526. if (that.refresh == 0) {
  527. that.refresh = 60
  528. getweighingList({
  529. compId: localStorage.getItem('ws-pf_compId'),
  530. currentPage: that.currentPage,
  531. pageSize: that.pageSize,
  532. searchKeyWord: that.searchKeyWord,
  533. warehouseName: that.warehouseName,
  534. managementType: 3,
  535. statusType: that.statusType,
  536. loadingstatus: 1,
  537. })
  538. .toPromise()
  539. .then((response) => {
  540. that.deliveryList = response.records
  541. that.deptBudgetTotal = response.total
  542. for (var i = 0; i < response.records.length; i++) {
  543. if (response.records[i].addressUrl != null) {
  544. if (response.records[i].addressUrl) {
  545. response.records[i].addressUrlArray =
  546. response.records[i].addressUrl.split(',')
  547. }
  548. } else {
  549. response.records[i].addressUrlArray = []
  550. }
  551. }
  552. for (var i = 0; i < response.records.length; i++) {
  553. var arr = new Array()
  554. that.addressUrls[i] = new Array()
  555. if (that.weighingList.records[i].addressUrl != null) {
  556. arr = that.weighingList.records[i].addressUrl.split(',')
  557. that.addressUrls[i] = arr
  558. }
  559. }
  560. })
  561. .catch((response) => {})
  562. }
  563. that.refresh--
  564. }, 1000);
  565. }
  566. },
  567. statustypechangelist(status) {
  568. this.statusType = status
  569. this.getList()
  570. },
  571. getNowTime() {
  572. var now = new Date()
  573. var year = now.getFullYear() //得到年份
  574. var month = now.getMonth() //得到月份
  575. var date = now.getDate() //得到日期
  576. month = month + 1
  577. month = month.toString().padStart(2, '0')
  578. date = date.toString().padStart(2, '0')
  579. var defaultDate = `${year}-${month}-${date}`
  580. this.$set(this.weighingList, 'inOutDate', defaultDate)
  581. },
  582. record() {
  583. this.$router.push({
  584. path: 'weighingManagementrecord',
  585. query: {
  586. warehouseName: this.warehouseName
  587. },
  588. })
  589. },
  590. closePrint() {
  591. this.isShowPrint = false
  592. },
  593. printSmall() {
  594. // localStorage.setItem('inspect', JSON.stringify(this.inspect))
  595. // window.open('../../../static/weightChecknew.html?type=1')
  596. localStorage.setItem('ck_bd_printData1', JSON.stringify(this.inspect))
  597. window.open('../../../../static/outWeightPrint.html?type=1&other="true"')
  598. },
  599. printBig() {
  600. localStorage.setItem('ck_bd_printData1', JSON.stringify(this.inspect))
  601. window.open('../../../../static/outWeightPrint.html?type=2&other="true"')
  602. // window.open('../../../static/weightChecknew.html?type=2&dataList=' + JSON.stringify(this.inspect))
  603. },
  604. opendBtn() {
  605. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  606. let dataURL = canvas.toDataURL('image/png')
  607. this.imgUrl = dataURL
  608. if (this.imgUrl !== '') {
  609. let b = this.dataURLtoFile(this.imgUrl, 'printImg')
  610. let formdata = new FormData()
  611. formdata.append('file', b)
  612. axios({
  613. method: 'post',
  614. url: 'https://www.zthymaoyi.com/upload/admin',
  615. data: formdata,
  616. }).then((response) => {
  617. //编辑接口
  618. this.weighingList.pictureAddress = response.data.url
  619. console.log(this.types)
  620. if (this.types == 3) {
  621. this.weighingList.flag = 0
  622. } else if (this.types == 4) {
  623. this.weighingList.flag = 1
  624. }
  625. if (this.tpyeNo == 1) {
  626. tareEdit(this.weighingList)
  627. .toPromise()
  628. .then((response) => {
  629. this.types = ''
  630. this.weighingList = {
  631. grossWeight: '',
  632. tare: '',
  633. tips: '',
  634. // contractNo:'',
  635. // inOutTaskNo:'',
  636. buckleMiscellaneous: 0,
  637. netWeight: 0,
  638. receivableWeighingFee: '',
  639. warehouseInOutDetail: {
  640. grade: '',
  641. imperfectGrain: '',
  642. impurity: '',
  643. jiaorenli: '',
  644. bulkDensity: '',
  645. mildewGrain: '',
  646. },
  647. qualityInspectionManagement: {
  648. boxNo: '暂无',
  649. boxNoOther: '暂无',
  650. titleNo: '暂无',
  651. titleNoOther: '暂无',
  652. },
  653. }
  654. // this.inspect = []
  655. })
  656. } else {
  657. grossWeight(this.weighingList)
  658. .toPromise()
  659. .then((response) => {
  660. this.types = ''
  661. this.weighingList = {
  662. grossWeight: '',
  663. tare: '',
  664. tips: '',
  665. // contractNo:'',
  666. // inOutTaskNo:'',
  667. buckleMiscellaneous: 0,
  668. netWeight: 0,
  669. receivableWeighingFee: '',
  670. warehouseInOutDetail: {
  671. grade: '',
  672. imperfectGrain: '',
  673. impurity: '',
  674. jiaorenli: '',
  675. bulkDensity: '',
  676. mildewGrain: '',
  677. },
  678. qualityInspectionManagement: {
  679. boxNo: '暂无',
  680. boxNoOther: '暂无',
  681. titleNo: '暂无',
  682. titleNoOther: '暂无',
  683. },
  684. }
  685. // this.inspect = []
  686. })
  687. }
  688. })
  689. }
  690. })
  691. },
  692. closeDialog() {
  693. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  694. let dataURL = canvas.toDataURL('image/png')
  695. this.imgUrl = dataURL
  696. if (this.imgUrl !== '') {
  697. let b = this.dataURLtoFile(this.imgUrl, 'printImg')
  698. let formdata = new FormData()
  699. formdata.append('file', b)
  700. axios({
  701. method: 'post',
  702. url: 'https://www.zthymaoyi.com/upload/admin',
  703. data: formdata,
  704. }).then((response) => {
  705. //编辑接口
  706. this.weighingList.pictureAddress = response.data.url
  707. console.log(this.types)
  708. if (this.types == 3) {
  709. this.weighingList.flag = 0
  710. } else if (this.types == 4) {
  711. this.weighingList.flag = 1
  712. }
  713. if (this.tpyeNo == 1) {
  714. tareEdit(this.weighingList)
  715. .toPromise()
  716. .then((response) => {
  717. this.types = ''
  718. this.weighingList = {
  719. grossWeight: '',
  720. tare: '',
  721. tips: '',
  722. // contractNo:'',
  723. // inOutTaskNo:'',
  724. buckleMiscellaneous: 0,
  725. netWeight: 0,
  726. receivableWeighingFee: '',
  727. warehouseInOutDetail: {
  728. grade: '',
  729. imperfectGrain: '',
  730. impurity: '',
  731. jiaorenli: '',
  732. bulkDensity: '',
  733. mildewGrain: '',
  734. },
  735. qualityInspectionManagement: {
  736. boxNo: '暂无',
  737. boxNoOther: '暂无',
  738. titleNo: '暂无',
  739. titleNoOther: '暂无',
  740. },
  741. }
  742. // this.inspect = []
  743. })
  744. } else {
  745. grossWeight(this.weighingList)
  746. .toPromise()
  747. .then((response) => {
  748. this.types = ''
  749. this.weighingList = {
  750. grossWeight: '',
  751. tare: '',
  752. tips: '',
  753. // contractNo:'',
  754. // inOutTaskNo:'',
  755. buckleMiscellaneous: 0,
  756. netWeight: 0,
  757. receivableWeighingFee: '',
  758. warehouseInOutDetail: {
  759. grade: '',
  760. imperfectGrain: '',
  761. impurity: '',
  762. jiaorenli: '',
  763. bulkDensity: '',
  764. mildewGrain: '',
  765. },
  766. qualityInspectionManagement: {
  767. boxNo: '暂无',
  768. boxNoOther: '暂无',
  769. titleNo: '暂无',
  770. titleNoOther: '暂无',
  771. },
  772. }
  773. // this.inspect = []
  774. })
  775. }
  776. })
  777. this.dialogTableVisible = true
  778. }
  779. })
  780. },
  781. weightweight() {
  782. if (this.tpyeNo == 1) {
  783. this.weighingList.grossWeight = this.weighingList.weight
  784. } else {
  785. this.weighingList.tare = this.weighingList.weight
  786. }
  787. },
  788. handleSizeChange(val) {
  789. console.log(`每页 ${val} 条`)
  790. this.pageSize = val
  791. this.getList()
  792. },
  793. handleCurrentChange(val) {
  794. this.currentPage = val
  795. console.log(`当前页: ${val}`)
  796. this.getList()
  797. },
  798. setVal(data) {
  799. if (this.information == '毛重') {
  800. this.weighingList.grossWeight = data
  801. this.weighingList.netWeight = Number(this.weighingList.grossWeight) - Number(this.weighingList.tare)
  802. } else {
  803. this.weighingList.tare = data
  804. }
  805. },
  806. openPort() {
  807. this.$refs.weightChild.openPort()
  808. },
  809. listclick(row) {
  810. this.id = row.id
  811. getweighing({
  812. id: row.id,
  813. })
  814. .toPromise()
  815. .then((response) => {
  816. this.weighingList = response
  817. if(response.inOutType == '移库出库' && this.warehouseType == '1'){
  818. this.recheckPrice = true
  819. }else{
  820. this.recheckPrice = false
  821. }
  822. this.carstatus=false
  823. // this.weighingList.carNo =
  824. // response.qualityInspectionManagement.carNumber
  825. this.$set(this.weighingList,'carNo', response.qualityInspectionManagement.carNumber)
  826. this.weighingList.boxNo = response.boxNo
  827. this.weighingList.boxNoOther = response.boxNoOther
  828. this.weighingList.titleNo = response.titleNo
  829. this.weighingList.titleNoOther = response.titleNoOther
  830. this.weighingList.wingNumber =
  831. response.qualityInspectionManagement.wingNumber
  832. this.weighingList.wingNumberOther =
  833. response.qualityInspectionManagement.wingNumberOther
  834. this.weighingList.warehouseInOutDetail = {
  835. grade: '',
  836. imperfectGrain: '',
  837. impurity: '',
  838. jiaorenli: '',
  839. bulkDensity: '',
  840. mildewGrain: '',
  841. }
  842. })
  843. // if(){
  844. // }
  845. // this.deptBudgetList=row
  846. // console.log(row)
  847. },
  848. add() {
  849. this.information = '皮重'
  850. this.weighingList = {
  851. grossWeight: 0,
  852. tare: 0,
  853. tips: '',
  854. // contractNo:'',
  855. // inOutTaskNo:'',
  856. buckleMiscellaneous: 0,
  857. netWeight: 0,
  858. receivableWeighingFee: '',
  859. warehouseInOutDetail: {
  860. grade: '',
  861. imperfectGrain: '',
  862. impurity: '',
  863. jiaorenli: '',
  864. bulkDensity: '',
  865. mildewGrain: '',
  866. },
  867. qualityInspectionManagement: {
  868. boxNo: '暂无',
  869. boxNoOther: '暂无',
  870. titleNo: '暂无',
  871. titleNoOther: '暂无',
  872. },
  873. }
  874. },
  875. deletelist() {
  876. if (this.id) {
  877. delelteWeighing({
  878. id: this.id,
  879. })
  880. .toPromise()
  881. .then((response) => {
  882. this.$message({
  883. message: '删除成功!',
  884. type: 'success',
  885. })
  886. this.id = ''
  887. this.weighingList = {
  888. grossWeight: '',
  889. tare: '',
  890. tips: '',
  891. // contractNo:'',
  892. // inOutTaskNo:'',
  893. buckleMiscellaneous: 0,
  894. netWeight: 0,
  895. receivableWeighingFee: '',
  896. warehouseInOutDetail: {
  897. grade: '',
  898. imperfectGrain: '',
  899. impurity: '',
  900. jiaorenli: '',
  901. bulkDensity: '',
  902. mildewGrain: '',
  903. },
  904. qualityInspectionManagement: {
  905. boxNo: '暂无',
  906. boxNoOther: '暂无',
  907. titleNo: '暂无',
  908. titleNoOther: '暂无',
  909. },
  910. }
  911. this.getList()
  912. })
  913. }
  914. },
  915. binNumberchange(e) {
  916. for (let i = 0; i < this.positionInfos.length; i++) {
  917. if (this.positionInfos[i].binNumber == e) {
  918. this.weighingList.positionId = this.positionInfos[i].id
  919. }
  920. }
  921. },
  922. print() {
  923. this.carjudge=false
  924. this.carChange1 = '手动填写'
  925. // if(this.tpyeNo==2){
  926. // if(this.weighingList.qualityInspectionManagement.status != '已质检'){
  927. // this.$message.error("该条信息未质检!")
  928. // return
  929. // }
  930. // }
  931. // for (var i = 0; i < this.outContractNo.length; i++) {
  932. // if (this.outContractNo[i].contractNo == this.weighingList.contractNo){
  933. // this.$set(this.weighingList,'customer',this.outContractNo[i].buyer)
  934. // }
  935. // }debugger
  936. // console.log(this.weighingList.customer)
  937. this.weighingList.carNumber = this.weighingList.carNo
  938. if (this.tpyeNo == 1 || this.tpyeNo == 2) {
  939. if (!this.weighingList.contractNo) {
  940. this.$message({
  941. message: '合同编号不能为空',
  942. type: 'warning',
  943. })
  944. return
  945. }
  946. if (!this.weighingList.binNumber && this.weighingList.warehouseType == 1) {
  947. this.$message({
  948. message: '仓位号不能为空',
  949. type: 'warning',
  950. })
  951. return
  952. }
  953. if (!this.weighingList.storageNumber) {
  954. this.$message({
  955. message: '囤位号不能为空',
  956. type: 'warning',
  957. })
  958. return
  959. }
  960. if (!this.weighingList.contractPrice && this.weighingList.inOutType != '移库出库') {
  961. this.$message({
  962. message: '价格不能为空',
  963. type: 'warning',
  964. })
  965. return
  966. }
  967. if (
  968. this.weighingList.storageNumber.length < 1 ||
  969. this.weighingList.storageNumber.length > 10
  970. ) {
  971. this.$message({
  972. message: '囤位号不超过10个字符!',
  973. type: 'warning',
  974. })
  975. return
  976. }
  977. if (!this.weighingList.carNumber) {
  978. this.$message({
  979. message: '车牌号不能为空',
  980. type: 'warning',
  981. })
  982. return
  983. }
  984. if (this.weighingList.carNumber.length != 7) {
  985. this.$message({
  986. message: '车牌号输入错误',
  987. type: 'warning',
  988. })
  989. return
  990. }
  991. if (!this.weighingList.inOutType) {
  992. this.$message({
  993. message: '出库类型不能为空',
  994. type: 'warning',
  995. })
  996. return
  997. }
  998. }
  999. if (!this.weighingList.binNumber&& this.weighingList.warehouseType == 1) {
  1000. this.$message({
  1001. message: '仓位号不能为空',
  1002. type: 'warning',
  1003. })
  1004. return
  1005. }
  1006. if (this.tpyeNo == 1) {
  1007. if (!this.weighingList.inOutType) {
  1008. this.$message({
  1009. message: '出库类型不能为空',
  1010. type: 'warning',
  1011. })
  1012. return
  1013. }
  1014. if (!this.weighingList.tare) {
  1015. this.$message({
  1016. message: '皮重不能为空',
  1017. type: 'warning',
  1018. })
  1019. return
  1020. }
  1021. if (
  1022. isNaN(this.weighingList.tare) ||
  1023. (String(this.weighingList.tare).indexOf('.') != -1 &&
  1024. String(this.weighingList.tare).length -
  1025. (String(this.weighingList.tare).indexOf('.') + 1) >
  1026. 1) ||
  1027. this.weighingList.tare < 1 ||
  1028. this.weighingList.tare > 100000
  1029. ) {
  1030. this.$message({
  1031. message: '皮重输入错误!',
  1032. type: 'warning',
  1033. })
  1034. return
  1035. }
  1036. }
  1037. if (this.types == 2) {
  1038. if (!this.weighingList.grossWeight) {
  1039. this.$message({
  1040. message: '毛重不能为空',
  1041. type: 'warning',
  1042. })
  1043. return
  1044. }
  1045. if (
  1046. isNaN(this.weighingList.grossWeight) ||
  1047. (String(this.weighingList.grossWeight).indexOf('.') != -1 &&
  1048. String(this.weighingList.grossWeight).length -
  1049. (String(this.weighingList.grossWeight).indexOf('.') + 1) >
  1050. 1) ||
  1051. this.weighingList.grossWeight < 1 ||
  1052. this.weighingList.grossWeight > 100000
  1053. ) {
  1054. this.$message({
  1055. message: '毛重输入错误!',
  1056. type: 'warning',
  1057. })
  1058. return
  1059. }
  1060. if (this.weighingList.netWeight < 0) {
  1061. this.$message({
  1062. message: '净重不能为负',
  1063. type: 'warning',
  1064. })
  1065. return
  1066. }
  1067. }
  1068. this.weighingList.compId = localStorage.getItem('ws-pf_compId')
  1069. this.weighingList.warehouseName = this.warehouseName
  1070. this.weighingList.warehouseType = this.warehouseType
  1071. this.$confirm('确定保存检斤信息?', '提示', {
  1072. confirmButtonText: '确定',
  1073. cancelButtonText: '取消',
  1074. type: 'warning',
  1075. })
  1076. .then(() => {
  1077. this.weighingList.inOutFlag = 1
  1078. this.weighingList.statusFlag = 3
  1079. // if (this.weighingList.grossWeight) {
  1080. // this.weighingList.grossWeight = this.weighingList.grossWeight / 1000
  1081. // }
  1082. // if (this.weighingList.netWeight) {
  1083. // this.weighingList.netWeight = this.weighingList.netWeight / 1000
  1084. // }
  1085. // this.weighingList.tare = this.weighingList.tare / 1000
  1086. // if (this.weighingList.buckleMiscellaneous) {
  1087. // this.weighingList.buckleMiscellaneous = this.weighingList.buckleMiscellaneous / 1000
  1088. // }
  1089. if (this.tpyeNo == 1) {
  1090. // this.weighingList.serviceManagementType=2
  1091. this.weighingList.statusFlag = 1
  1092. this.weighingList.relationId = this.relationId
  1093. this.weighingList.warehouseId = this.warehouseId
  1094. this.weighingList.baseId = this.warehouseId
  1095. this.weighingList.skinInspector =
  1096. localStorage.getItem('ws-pf_staffName')
  1097. if (this.weighingList.id) { //修改皮重
  1098. var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
  1099. weighingList1.id = this.weighingList.warehouseInOutId
  1100. weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
  1101. weighingList1.weighingManagement = this.weighingList
  1102. if (weighingList1.tare) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
  1103. weighingList1.tare = weighingList1.tare / 1000
  1104. }
  1105. if (weighingList1.netWeight) {
  1106. weighingList1.netWeight = weighingList1.netWeight / 1000
  1107. }
  1108. newSubmit(weighingList1)
  1109. .toPromise()
  1110. .then((response) => {
  1111. getweighing({
  1112. id: this.weighingList.id
  1113. })
  1114. .toPromise().then((response) => {
  1115. if (this.reader) {
  1116. this.reader.cancel()
  1117. }
  1118. this.$notify({
  1119. title: '成功',
  1120. message: '提交成功',
  1121. type: 'success',
  1122. })
  1123. this.getList()
  1124. this.weighingList = response
  1125. // this.warehouseCount = Number(this.warehouseCount) + 1
  1126. // this.warehouseCount1 = Number(this.warehouseCount1) + 1
  1127. this.inspect = JSON.parse(
  1128. JSON.stringify(this.weighingList)
  1129. )
  1130. this.isShowPrint = true
  1131. this.weighingList = {
  1132. grossWeight: 0,
  1133. tare: 0,
  1134. tips: '',
  1135. // contractNo:'',
  1136. // inOutTaskNo:'',
  1137. buckleMiscellaneous: 0,
  1138. netWeight: 0,
  1139. receivableWeighingFee: '',
  1140. warehouseInOutDetail: {
  1141. grade: '',
  1142. imperfectGrain: '',
  1143. impurity: '',
  1144. jiaorenli: '',
  1145. bulkDensity: '',
  1146. mildewGrain: '',
  1147. },
  1148. qualityInspectionManagement: {
  1149. boxNo: '暂无',
  1150. boxNoOther: '暂无',
  1151. titleNo: '暂无',
  1152. titleNoOther: '暂无',
  1153. },
  1154. }
  1155. })
  1156. })
  1157. } else { //新增皮检信息
  1158. this.weighingList.relationId = this.relationId
  1159. this.weighingList.warehouseId = this.warehouseId
  1160. this.weighingList.baseId = this.warehouseId
  1161. this.weighingList.warehouseNo = this.warehouseNo
  1162. var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
  1163. weighingList1.id = this.weighingList.warehouseInOutId
  1164. weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
  1165. weighingList1.weighingManagement = this.weighingList
  1166. if (weighingList1.tare) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
  1167. weighingList1.tare = weighingList1.tare / 1000
  1168. }
  1169. if (weighingList1.netWeight) {
  1170. weighingList1.netWeight = weighingList1.netWeight / 1000
  1171. }
  1172. newSubmit(weighingList1)
  1173. .toPromise()
  1174. .then((response) => {
  1175. getweighing({
  1176. id: response
  1177. })
  1178. .toPromise().then((response) => {
  1179. if (this.reader) {
  1180. this.reader.cancel()
  1181. }
  1182. this.$notify({
  1183. title: '成功',
  1184. message: '提交成功',
  1185. type: 'success',
  1186. })
  1187. this.getList()
  1188. this.weighingList = response
  1189. // this.warehouseCount = Number(this.warehouseCount) + 1
  1190. // this.warehouseCount1 = Number(this.warehouseCount1) + 1
  1191. this.inspect = JSON.parse(
  1192. JSON.stringify(this.weighingList)
  1193. )
  1194. this.isShowPrint = true
  1195. this.weighingList = {
  1196. grossWeight: 0,
  1197. tare: 0,
  1198. tips: '',
  1199. // contractNo:'',
  1200. // inOutTaskNo:'',
  1201. buckleMiscellaneous: 0,
  1202. netWeight: 0,
  1203. receivableWeighingFee: '',
  1204. warehouseInOutDetail: {
  1205. grade: '',
  1206. imperfectGrain: '',
  1207. impurity: '',
  1208. jiaorenli: '',
  1209. bulkDensity: '',
  1210. mildewGrain: '',
  1211. },
  1212. qualityInspectionManagement: {
  1213. boxNo: '暂无',
  1214. boxNoOther: '暂无',
  1215. titleNo: '暂无',
  1216. titleNoOther: '暂无',
  1217. },
  1218. }
  1219. })
  1220. })
  1221. }
  1222. } else if (this.tpyeNo == 2) {
  1223. this.weighingList.secretaryWeigher =
  1224. localStorage.getItem('ws-pf_staffName')
  1225. this.weighingList.warehouseId = this.warehouseId
  1226. this.weighingList.baseId = this.warehouseId
  1227. var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
  1228. weighingList1.id = this.weighingList.warehouseInOutId
  1229. weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
  1230. weighingList1.weighingManagement = this.weighingList
  1231. if (weighingList1.grossWeight) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
  1232. weighingList1.grossWeight = weighingList1.grossWeight / 1000
  1233. }
  1234. if (weighingList1.netWeight) {
  1235. weighingList1.netWeight = weighingList1.netWeight / 1000
  1236. }
  1237. if (weighingList1.tare) {
  1238. weighingList1.tare = weighingList1.tare / 1000
  1239. }
  1240. newSubmit(weighingList1)
  1241. .toPromise()
  1242. .then((response) => {
  1243. getweighing({
  1244. id: response
  1245. })
  1246. .toPromise().then((response) => {
  1247. this.weighingList = response
  1248. this.inspect = JSON.parse(
  1249. JSON.stringify(this.weighingList)
  1250. )
  1251. this.isShowPrint = true
  1252. })
  1253. if (this.reader) {
  1254. this.reader.cancel()
  1255. }
  1256. // this.$notify.success({
  1257. // title: '成功',
  1258. // message: '提交成功',
  1259. // })
  1260. this.$notify({
  1261. title: '成功',
  1262. message: '提交成功',
  1263. type: 'success',
  1264. })
  1265. this.inspect = JSON.parse(JSON.stringify(this.weighingList))
  1266. this.isShowPrint = true
  1267. this.weighingList = {
  1268. grossWeight: 0,
  1269. selfLoading: 0,
  1270. tare: 0,
  1271. tips: '',
  1272. // contractNo:'',
  1273. // inOutTaskNo:'',
  1274. buckleMiscellaneous: 0,
  1275. netWeight: 0,
  1276. receivableWeighingFee: '',
  1277. warehouseInOutDetail: {
  1278. grade: '',
  1279. imperfectGrain: '',
  1280. impurity: '',
  1281. jiaorenli: '',
  1282. bulkDensity: '',
  1283. mildewGrain: '',
  1284. },
  1285. qualityInspectionManagement: {
  1286. boxNo: '暂无',
  1287. boxNoOther: '暂无',
  1288. titleNo: '暂无',
  1289. titleNoOther: '暂无',
  1290. },
  1291. }
  1292. this.getList()
  1293. })
  1294. // addstorageputList(weighingList1)
  1295. // .toPromise()
  1296. // .then((response) => {
  1297. // this.weighingList.grossWeight =
  1298. // this.weighingList.grossWeight * 1000
  1299. // this.weighingList.tare = this.weighingList.tare * 1000
  1300. // this.weighingList.netWeight =
  1301. // this.weighingList.netWeight * 1000
  1302. // this.weighingList.buckleMiscellaneous =
  1303. // this.weighingList.buckleMiscellaneous * 1000
  1304. // this.weighingList.warehouseInOutId = response
  1305. // grossWeight(this.weighingList)
  1306. // .toPromise()
  1307. // .then((response) => {
  1308. // getweighing({
  1309. // id: response
  1310. // })
  1311. // .toPromise()
  1312. // .then((response) => {
  1313. // this.weighingList = response
  1314. // this.inspect = JSON.parse(
  1315. // JSON.stringify(this.weighingList)
  1316. // )
  1317. // this.isShowPrint = true
  1318. // })
  1319. // if (this.reader) {
  1320. // this.reader.cancel()
  1321. // }
  1322. // // this.$notify.success({
  1323. // // title: '成功',
  1324. // // message: '提交成功',
  1325. // // })
  1326. // this.$notify({
  1327. // title: '成功',
  1328. // message: '提交成功',
  1329. // type: 'success',
  1330. // })
  1331. // this.inspect = JSON.parse(JSON.stringify(this.weighingList))
  1332. // this.isShowPrint = true
  1333. // this.weighingList = {
  1334. // grossWeight: 0,
  1335. // selfLoading: 0,
  1336. // tare: 0,
  1337. // tips: '',
  1338. // // contractNo:'',
  1339. // // inOutTaskNo:'',
  1340. // buckleMiscellaneous: 0,
  1341. // netWeight: 0,
  1342. // receivableWeighingFee: '',
  1343. // warehouseInOutDetail: {
  1344. // grade: '',
  1345. // imperfectGrain: '',
  1346. // impurity: '',
  1347. // jiaorenli: '',
  1348. // bulkDensity: '',
  1349. // mildewGrain: '',
  1350. // },
  1351. // qualityInspectionManagement: {
  1352. // boxNo: '暂无',
  1353. // boxNoOther: '暂无',
  1354. // titleNo: '暂无',
  1355. // titleNoOther: '暂无',
  1356. // },
  1357. // }
  1358. // this.getList()
  1359. // })
  1360. // })
  1361. // .catch((response) => {})
  1362. }
  1363. })
  1364. .catch(() => {
  1365. return false
  1366. })
  1367. },
  1368. carNoTypeChange() {
  1369. this.carjudge = !this.carjudge
  1370. if (this.carjudge) {
  1371. this.weighingList.selfLoading = '1'
  1372. this.carChange1 = '识别下拉'
  1373. } else {
  1374. this.weighingList.selfLoading = '0'
  1375. this.carChange1 = '手动填写'
  1376. }
  1377. },
  1378. tabClick(val) {
  1379. this.weighingList = {
  1380. grossWeight: '',
  1381. tare: '',
  1382. tips: '',
  1383. buckleMiscellaneous: 0,
  1384. netWeight: 0,
  1385. receivableWeighingFee: '',
  1386. warehouseInOutDetail: {
  1387. grade: '',
  1388. imperfectGrain: '',
  1389. impurity: '',
  1390. jiaorenli: '',
  1391. bulkDensity: '',
  1392. mildewGrain: '',
  1393. },
  1394. qualityInspectionManagement: {
  1395. boxNo: '暂无',
  1396. boxNoOther: '暂无',
  1397. titleNo: '暂无',
  1398. titleNoOther: '暂无',
  1399. },
  1400. }
  1401. this.index = val
  1402. // this.disabled=true
  1403. if (val == 0) {
  1404. this.statusType = '3'
  1405. this.information = '皮重'
  1406. this.tpyeNo = '1'
  1407. this.recheck1 = false
  1408. } else {
  1409. this.statusType = 3
  1410. this.tpyeNo = '2'
  1411. this.information = '毛重'
  1412. this.recheck1 = true
  1413. }
  1414. this.getList()
  1415. },
  1416. warehouseNameChange(e) {
  1417. for (let i = 0; i < this.warehouseList.length; i++) {
  1418. if (this.warehouseList[i].value == e) {
  1419. this.warehouseId = this.warehouseList[i].warehouseId
  1420. // this.warehouseCount = this.warehouseList[i].ouCount
  1421. }
  1422. }
  1423. for (let i = 0; i < this.warehouseList1.length; i++) {
  1424. if (this.warehouseList1[i].warehouseName == e) {
  1425. localStorage.setItem(
  1426. 'houseSelfCollect_house1',
  1427. JSON.stringify({
  1428. No: this.warehouseList1[i].commonWarehouseNo,
  1429. allowEdit: this.warehouseList1[i].allowEdit,
  1430. value: this.warehouseList1[i].warehouseName,
  1431. count: this.warehouseList1[i].count,
  1432. warehouseId: this.warehouseList1[i].id,
  1433. })
  1434. )
  1435. if (this.warehouseList1[i].allowEdit == 1) {
  1436. this.disabled = false
  1437. } else {
  1438. this.disabled = true
  1439. }
  1440. this.positionInfos = this.warehouseList1[i].positionInfos
  1441. this.warehouseCount = this.warehouseList1[i].outCount
  1442. this.warehouseNo = this.warehouseList1[i].commonWarehouseNo
  1443. this.warehouseType = this.warehouseList1[i].warehouseType
  1444. }
  1445. }
  1446. this.getList()
  1447. this.weighingList = {
  1448. grossWeight: 0,
  1449. selfLoading: 0,
  1450. tare: 0,
  1451. tips: '',
  1452. // contractNo:'',
  1453. // inOutTaskNo:'',
  1454. buckleMiscellaneous: 0,
  1455. netWeight: 0,
  1456. receivableWeighingFee: '',
  1457. warehouseInOutDetail: {
  1458. grade: '',
  1459. imperfectGrain: '',
  1460. impurity: '',
  1461. jiaorenli: '',
  1462. bulkDensity: '',
  1463. mildewGrain: '',
  1464. },
  1465. qualityInspectionManagement: {
  1466. boxNo: '暂无',
  1467. boxNoOther: '暂无',
  1468. titleNo: '暂无',
  1469. titleNoOther: '暂无',
  1470. },
  1471. }
  1472. },
  1473. // async openPort() {
  1474. // console.log('openPort', navigator)
  1475. // if ('serial' in navigator) {
  1476. // // if (!this.$store.state.app.reader) {
  1477. // // The Web Serial API is supported.
  1478. // console.log('the Web Serial API is supported.')
  1479. // console.log(this.param)
  1480. // const port = await navigator.serial.requestPort()
  1481. // await port.open({
  1482. // baudRate: this.param,
  1483. // }) // set baud rate
  1484. // this.reader = port.readable.getReader()
  1485. // console.log('beforeReader', port)
  1486. // console.log('beforeReader', this.reader)
  1487. // this.$store.dispatch('app/setReader', this.reader)
  1488. // // } else {
  1489. // // console.log('afterport', this.$store.state.app.reader)
  1490. // // this.reader = this.$store.state.app.reader
  1491. // // }
  1492. // // 监听来自串行设备的数据
  1493. // while (true) {
  1494. // const {
  1495. // value,
  1496. // done
  1497. // } = await this.reader.read()
  1498. // // console.log("value",value);
  1499. // if (done) {
  1500. // // 允许稍后关闭串口。
  1501. // this.reader.releaseLock()
  1502. // break
  1503. // }
  1504. // var result = ''
  1505. // //2。获取16进制字符串
  1506. // // var receData = HexConvert.ByteToString(value);
  1507. // // console.log("receData",receData);
  1508. // var flag = false
  1509. // // for(var i=0;i<value.length;i++){
  1510. // // var tmp = String.fromCharCode(value[i])
  1511. // // if(tmp == '+'){
  1512. // // flag = true
  1513. // // }
  1514. // // if(flag && result.length <6 && tmp != '+'){
  1515. // // result += tmp
  1516. // // }
  1517. // // }
  1518. // // if(this.tpyeNo != 2){
  1519. // // this.weighingList.grossWeight = parseInt(result)
  1520. // // }
  1521. // // else{
  1522. // // this.weighingList.tare = parseInt(result)
  1523. // // }
  1524. // if (
  1525. // (this.warehouseName &&
  1526. // (this.warehouseName == '山东诸城迈饶库' ||
  1527. // this.warehouseName == '克东千红库')) ||
  1528. // this.warehouseName == '鲅鱼圈祥腾库' ||
  1529. // this.warehouseName == '哈尔滨依兰库' ||
  1530. // this.warehouseName == '龙江金信库'
  1531. // ) {
  1532. // for (var i = 0; i < value.length; i++) {
  1533. // var tmp = String.fromCharCode(value[i])
  1534. // if (tmp == '+') {
  1535. // flag = true
  1536. // }
  1537. // if (flag && result.length < 6 && tmp != '+') {
  1538. // result += tmp
  1539. // }
  1540. // }
  1541. // if (this.tpyeNo != 2) {
  1542. // if (parseInt(result) || parseInt(result) == 0) {
  1543. // this.weighingList.weight = parseInt(result)
  1544. // }
  1545. // } else {
  1546. // if (parseInt(result) || parseInt(result) == 0) {
  1547. // this.weighingList.weight = parseInt(result)
  1548. // }
  1549. // }
  1550. // } else if (
  1551. // this.warehouseName &&
  1552. // (this.warehouseName == '顺诚粮库' ||
  1553. // this.warehouseName == '鲅鱼圈金信库')
  1554. // ) {
  1555. // for (var i = value.length - 1; i >= 0; i--) {
  1556. // var tmp = String.fromCharCode(value[i])
  1557. // console.log(tmp)
  1558. // if (String.fromCharCode(value[0]) == '.') {
  1559. // flag = true
  1560. // }
  1561. // if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
  1562. // result += tmp
  1563. // }
  1564. // }
  1565. // if (this.tpyeNo != 2) {
  1566. // if (parseInt(result) || parseInt(result) == 0) {
  1567. // this.weighingList.weight = parseInt(result)
  1568. // }
  1569. // } else {
  1570. // if (parseInt(result) || parseInt(result) == 0) {
  1571. // this.weighingList.weight = parseInt(result)
  1572. // }
  1573. // }
  1574. // } else {
  1575. // for (var i = 0; i < value.length; i++) {
  1576. // var tmp = String.fromCharCode(value[i])
  1577. // if (value[0] != 49 && value[0] != 2) {
  1578. // break
  1579. // }
  1580. // if (tmp == String.fromCharCode(32)) {
  1581. // flag = true
  1582. // }
  1583. // if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
  1584. // // if(i-1 >=0 &&tmp == String.fromCharCode(48) && value[i-1] == 32){
  1585. // // continue
  1586. // // }
  1587. // // if(i-2 >=0 &&tmp == String.fromCharCode(48) && value[i-2] == 32){
  1588. // // continue
  1589. // // }
  1590. // result += tmp
  1591. // }
  1592. // }
  1593. // if (this.tpyeNo != 2) {
  1594. // if (parseInt(result) || parseInt(result) == 0) {
  1595. // this.weighingList.weight = parseInt(result) * 100
  1596. // }
  1597. // } else {
  1598. // if (parseInt(result) || parseInt(result) == 0) {
  1599. // this.weighingList.weight = parseInt(result) * 100
  1600. // }
  1601. // }
  1602. // }
  1603. // // setTimeout(1000)
  1604. // // value 是一个 Uint8Array
  1605. // }
  1606. // await port.close()
  1607. // } else {
  1608. // console.log('the Web Serial API is not supported.', navigator)
  1609. // }
  1610. // },
  1611. find() {
  1612. this.getList()
  1613. },
  1614. calculation() {
  1615. if (this.weighingList.grossWeight && this.weighingList.tare) {
  1616. let count = 0
  1617. this.weighingList.netWeight =
  1618. this.weighingList.grossWeight -
  1619. this.weighingList.tare -
  1620. Number(
  1621. this.weighingList.buckleMiscellaneous ?
  1622. this.weighingList.buckleMiscellaneous :
  1623. 0
  1624. )
  1625. }
  1626. },
  1627. carChange(e) {
  1628. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  1629. if (this.tranCarInfoList[i].carNo == this.weighingList.carNo) {
  1630. this.weighingList.carNumber = this.tranCarInfoList[i].carNo
  1631. this.weighingList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  1632. this.weighingList.carId = this.tranCarInfoList[i].id
  1633. }
  1634. }
  1635. },
  1636. // 获取当前年月日
  1637. getTime() {
  1638. var date = new Date()
  1639. var mouth = date.getMonth() + 1
  1640. var day = date.getDate()
  1641. if (mouth < 10) {
  1642. mouth = '0' + mouth
  1643. }
  1644. if (day < 10) {
  1645. day = '0' + day
  1646. }
  1647. return date.getFullYear() + mouth + day
  1648. },
  1649. contractNoChange(e) {
  1650. this.weighingList={
  1651. grossWeight: '',
  1652. tare: '',
  1653. buckleMiscellaneous: 0,
  1654. netWeight: 0,
  1655. weight: '',
  1656. tips: '',
  1657. carNo:'',
  1658. // contractNo:'',
  1659. // inOutTaskNo:'',
  1660. receivableWeighingFee: '',
  1661. warehouseInOutDetail: {
  1662. grade: '',
  1663. imperfectGrain: '',
  1664. impurity: '',
  1665. jiaorenli: '',
  1666. bulkDensity: '',
  1667. mildewGrain: '',
  1668. },
  1669. qualityInspectionManagement: {
  1670. boxNo: '暂无',
  1671. boxNoOther: '暂无',
  1672. titleNo: '暂无',
  1673. titleNoOther: '暂无',
  1674. },
  1675. inOutDate: ''
  1676. }
  1677. this.weighingList.inOutTaskNo=e
  1678. this.warehouseCount = this.warehouseCount1
  1679. var data = null
  1680. for (let i = 0; i < this.taskNolist.length; i++) {
  1681. if (this.taskNolist[i].inOutTaskNo == e) {
  1682. // this.weighingList.number = this.taskNolist[i].inOutTaskNo
  1683. // this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
  1684. this.weighingList.numberLetter = 'XSCK'
  1685. this.weighingList.goodsName = this.taskNolist[i].goodsName
  1686. this.weighingList.tips = this.taskNolist[i].businessDescribe
  1687. data = this.taskNolist[i]
  1688. if(this.taskNolist[i].inOutType=='移库出库'){
  1689. this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
  1690. if(this.warehouseType == '1'){
  1691. this.recheckPrice = true
  1692. }else{
  1693. this.recheckPrice = false
  1694. }
  1695. }else{
  1696. if (this.taskNolist[i].contractNo) {
  1697. // console.log(this.taskNolist[i])
  1698. this.weighingList.contractNo = this.taskNolist[i].contractNo
  1699. } else {
  1700. this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
  1701. }
  1702. this.recheckPrice = false
  1703. }
  1704. }
  1705. }
  1706. // if (!data) return
  1707. for (var i = 0; i < this.outContractNo.length; i++) {
  1708. if (this.outContractNo[i].contractNo == this.weighingList.contractNo) {
  1709. this.weighingList.goodsName = this.outContractNo[i].goodsName
  1710. if (this.weighingList.goodsName == '玉米(潮粮)') {
  1711. this.weighingList.type = '潮粮'
  1712. } else {
  1713. this.weighingList.type = '干粮'
  1714. }
  1715. console.log(this.outContractNo[i],12222)
  1716. // this.weighingList.contractPrice = this.outContractNo[i].unitContractPrice
  1717. this.$set(this.weighingList,'contractPrice',this.outContractNo[i].unitContractPrice)
  1718. this.$set(this.weighingList,'customer',this.outContractNo[i].buyer)
  1719. this.weighingList.goodsNameKey = this.outContractNo[i].goodsNameKey
  1720. this.weighingList.grade = this.outContractNo[i].grade
  1721. this.weighingList.inOutType = this.outContractNo[i].inOutType
  1722. if (this.outContractNo[i].inOutType == '销售出库') {
  1723. this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
  1724. this.weighingList.numberLetter = 'XSCK'
  1725. this.weighingList.buyer = this.outContractNo[i].buyer
  1726. this.weighingList.seller = localStorage.getItem('ws-pf_compName')
  1727. if (!this.outContractNo[i].unitContractPrice) {
  1728. this.weighingList.tips = '买方' + this.outContractNo[i].buyer
  1729. } else {
  1730. this.weighingList.tips =
  1731. '买方' +
  1732. this.outContractNo[i].buyer +
  1733. '( ' +
  1734. this.outContractNo[i].unitContractPrice +
  1735. '元/吨)'
  1736. }
  1737. this.weighingList.inOutTypeKey = 1
  1738. } else if (this.outContractNo[i].inOutType == '移库出库') {
  1739. this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
  1740. this.weighingList.numberLetter = 'YKCK'
  1741. this.weighingList.buyer = this.outContractNo[i].receiveWarehouse
  1742. this.weighingList.seller = this.outContractNo[i].sendWarehouse
  1743. this.weighingList.goodsName = data == null?'玉米':data.goodsName
  1744. this.weighingList.goodsNameKey = data == null?'1':data.goodsNameKey
  1745. this.weighingList.grade = data == null?'二等品':data.grade
  1746. if (this.outContractNo[i].unitContractPrice) {
  1747. this.weighingList.tips =
  1748. '入货库' +
  1749. data == null?'':data.receiveWarehouse +
  1750. '( ' +
  1751. this.outContractNo[i].unitContractPrice +
  1752. '元/吨)'
  1753. } else {
  1754. this.weighingList.tips = '入货库' + data == null?'':data.receiveWarehouse
  1755. }
  1756. this.weighingList.inOutTypeKey = 3
  1757. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  1758. this.weighingList.inOutTypeKey = 4
  1759. } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
  1760. this.weighingList.inOutTypeKey = 5
  1761. } else if (this.outContractNo[i].inOutType == '采购出库') {
  1762. this.weighingList.inOutTypeKey = 6
  1763. }
  1764. if (this.outContractNo[i].deliverType == '1') {
  1765. this.carstatus = true
  1766. } else {
  1767. this.carstatus = false
  1768. }
  1769. if (this.outContractNo[i].tranCarInfoList) {
  1770. this.options2 = this.outContractNo[i].tranCarInfoList
  1771. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  1772. this.carstatus = true
  1773. }
  1774. if (this.outContractNo[i].tranCarInfoList1) {
  1775. this.fleetNameList = this.outContractNo[i].tranCarInfoList1
  1776. }
  1777. }
  1778. }
  1779. },
  1780. selectWarehouse() {
  1781. selectWarehouseSelf({
  1782. compId: localStorage.getItem('ws-pf_compId'),
  1783. })
  1784. .toPromise()
  1785. .then((response) => {
  1786. this.warehouseList = []
  1787. for (let i = 0; i < response.length; i++) {
  1788. this.warehouseList.push({
  1789. value: response[i].warehouseName,
  1790. warehouseId: response[i].id,
  1791. })
  1792. }
  1793. let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
  1794. _wareHouse = JSON.parse(_wareHouse)
  1795. for (let i = 0; i < response.length; i++) {
  1796. if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
  1797. this.warehouseName = response[i].warehouseName
  1798. this.warehouseId = response[i].id
  1799. this.positionInfos = response[i].positionInfos
  1800. this.warehouseCount = response[i].outCount
  1801. this.warehouseCount1 = response[i].outCount
  1802. this.warehouseNo = response[i].commonWarehouseNo
  1803. this.warehouseType = response[i].warehouseType
  1804. if (response[i].allowEdit == 1) {
  1805. this.disabled = false
  1806. } else {
  1807. this.disabled = true
  1808. }
  1809. }
  1810. if (!_wareHouse) {
  1811. this.warehouseName = this.warehouseList[0].value
  1812. this.warehouseId = this.warehouseList[0].warehouseId
  1813. this.positionInfos = response[0].positionInfos
  1814. this.warehouseCount = response[0].outCount
  1815. this.warehouseCount1 = response[0].outCount
  1816. this.warehouseNo = response[0].commonWarehouseNo
  1817. this.warehouseType = response[0].warehouseType
  1818. if (response[0].allowEdit == 1) {
  1819. this.disabled = false
  1820. } else {
  1821. this.disabled = true
  1822. }
  1823. console.log()
  1824. }
  1825. }
  1826. this.warehouseList1 = response
  1827. this.deptBudgetList.warehouseName = this.warehouseName
  1828. this.getList()
  1829. })
  1830. },
  1831. getList() {
  1832. pullDown({
  1833. constId: 'CON6',
  1834. })
  1835. .toPromise()
  1836. .then((response) => {
  1837. this.storageType = response
  1838. })
  1839. getReceiptTaskNo({
  1840. flag: 1,
  1841. warehouseName: this.warehouseName,
  1842. agentKey: localStorage.getItem('ws-pf_userId'),
  1843. })
  1844. .toPromise()
  1845. .then((response) => {
  1846. this.taskNolist = response
  1847. })
  1848. //合同编号
  1849. xialaNo({
  1850. compId: localStorage.getItem('ws-pf_compId'),
  1851. flag: 5,
  1852. })
  1853. .toPromise()
  1854. .then((response) => {
  1855. this.outContractNo = response
  1856. })
  1857. // this.refreshClick(1)
  1858. getweighingList({
  1859. compId: localStorage.getItem('ws-pf_compId'),
  1860. currentPage: this.currentPage,
  1861. pageSize: this.pageSize,
  1862. searchKeyWord: this.searchKeyWord,
  1863. warehouseName: this.warehouseName,
  1864. managementType: 3,
  1865. statusType: this.statusType,
  1866. })
  1867. .toPromise()
  1868. .then((response) => {
  1869. this.deliveryList = response.records
  1870. this.deptBudgetTotal = response.total
  1871. for (var i = 0; i < response.records.length; i++) {
  1872. if (response.records[i].addressUrl != null) {
  1873. if (response.records[i].addressUrl) {
  1874. response.records[i].addressUrlArray =
  1875. response.records[i].addressUrl.split(',')
  1876. }
  1877. } else {
  1878. response.records[i].addressUrlArray = []
  1879. }
  1880. }
  1881. for (var i = 0; i < response.records.length; i++) {
  1882. var arr = new Array()
  1883. this.addressUrls[i] = new Array()
  1884. if (this.weighingList.records[i].addressUrl != null) {
  1885. arr = this.weighingList.records[i].addressUrl.split(',')
  1886. this.addressUrls[i] = arr
  1887. }
  1888. }
  1889. })
  1890. .catch((response) => {})
  1891. },
  1892. },
  1893. }
  1894. </script>
  1895. <style lang="scss" scoped>
  1896. .center {
  1897. background: #fff;
  1898. }
  1899. .size_css {
  1900. width: 540px;
  1901. min-width: 540px;
  1902. overflow-x: scroll;
  1903. position: relative;
  1904. }
  1905. .ws-info-table {
  1906. border: none;
  1907. }
  1908. .base_header_layout {
  1909. padding: 10px;
  1910. margin-bottom: 10px;
  1911. }
  1912. .ws-info-table .el-form-item {
  1913. width: 50%;
  1914. border: none;
  1915. }
  1916. .formItem {
  1917. width: 100%;
  1918. display: inline;
  1919. }
  1920. .ws-info-table {
  1921. border: none;
  1922. }
  1923. .ws-info-table .el-form-item {
  1924. width: 100%;
  1925. border: none;
  1926. }
  1927. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1928. width: 30%;
  1929. text-align: center;
  1930. background: #ffffff;
  1931. color: #8890b1;
  1932. }
  1933. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1934. border: none;
  1935. }
  1936. /deep/.el-textarea__inner {
  1937. width: 92%;
  1938. }
  1939. /deep/.ws-info-table .el-form-item.rememo .el-form-item__content {
  1940. height: 76px;
  1941. }
  1942. .title {
  1943. font-size: 16px;
  1944. font-weight: 600;
  1945. margin: 10px;
  1946. }
  1947. .titleup {
  1948. position: relative;
  1949. }
  1950. .title::before {
  1951. content: '';
  1952. display: inline-block;
  1953. width: 5px;
  1954. height: 15px;
  1955. background: #8890b1;
  1956. margin-right: 5px;
  1957. }
  1958. .substance {
  1959. background: #ffffff;
  1960. width: 100%;
  1961. border-radius: 4px;
  1962. margin: 0 auto;
  1963. padding-top: 20px;
  1964. }
  1965. /deep/.el-table .el-table__header .cell,
  1966. .el-table .el-table__body .cell {
  1967. text-align: center;
  1968. }
  1969. /deep/.el-table--enable-row-transition .el-table__body td {
  1970. text-align: center;
  1971. }
  1972. .bg-left {
  1973. padding-left: 30px;
  1974. }
  1975. .bg-right {
  1976. padding-right: 10px;
  1977. text-align: right;
  1978. }
  1979. .bg-bottom {
  1980. margin: 15px 0px;
  1981. }
  1982. .titleup {
  1983. position: relative;
  1984. }
  1985. /deep/ .substance .bangdan {
  1986. width: 100%;
  1987. padding-top: 6%;
  1988. padding-bottom: 6%;
  1989. }
  1990. // // .photo2{
  1991. // // margin-top: 10px;
  1992. // // }
  1993. .el-upload--picture-card {
  1994. background-color: #fbfdff;
  1995. border: 1px dashed #c0ccda;
  1996. border-radius: 6px;
  1997. box-sizing: border-box;
  1998. width: 148px;
  1999. height: 148px;
  2000. line-height: 146px;
  2001. vertical-align: top;
  2002. margin-left: -289px;
  2003. }
  2004. // .titleup::before {
  2005. // content: '';
  2006. // display: inline-block;
  2007. // width: 5px;
  2008. // height: 30px;
  2009. // background: #5473e8;
  2010. // position: absolute;
  2011. // left: 0;
  2012. // }
  2013. .but {
  2014. text-align: center;
  2015. margin: 20px auto;
  2016. }
  2017. .stocks {
  2018. position: relative;
  2019. /deep/.el-select>.el-input {
  2020. display: inline-block;
  2021. }
  2022. /deep/>.el-input {
  2023. width: 33.3333%;
  2024. }
  2025. .add,
  2026. .del {
  2027. position: absolute;
  2028. right: -16px;
  2029. transform: translateY(20%);
  2030. }
  2031. .del {
  2032. right: -40px;
  2033. }
  2034. }
  2035. .butCss {
  2036. opacity: 0;
  2037. color: #000;
  2038. }
  2039. .center {
  2040. overflow-y: scroll;
  2041. }
  2042. .el-button--success.is-plain {
  2043. border: 1px solid #2aff7c;
  2044. background: black;
  2045. color: #2aff7c;
  2046. width: 50%;
  2047. }
  2048. .call-show {
  2049. width: 540px;
  2050. }
  2051. .top {
  2052. background: black;
  2053. color: #2aff7c;
  2054. font-size: 32px;
  2055. text-align: right;
  2056. padding: 0 10px 0 20px;
  2057. border-radius: 10px;
  2058. margin: 0 20px 20px 21px;
  2059. position: absolute;
  2060. top: 140px;
  2061. width: 465px;
  2062. .zujian {
  2063. position: relative;
  2064. }
  2065. .kg-style {
  2066. font-size: 30px;
  2067. color: red;
  2068. }
  2069. .confirmInfo {
  2070. display: flex;
  2071. // line-height: 90px;
  2072. .car-type {
  2073. text-align: left;
  2074. width: 50%;
  2075. min-width: 200px;
  2076. }
  2077. .car-no {
  2078. width: 50%;
  2079. text-align: right;
  2080. }
  2081. }
  2082. .confirmWeight {
  2083. display: flex;
  2084. align-items: center;
  2085. .titleWeight {
  2086. width: 35%;
  2087. min-width: 200px;
  2088. text-align: left;
  2089. line-height: 90px;
  2090. color: red;
  2091. }
  2092. .weight {
  2093. width: 65%;
  2094. text-align: right;
  2095. color: red;
  2096. }
  2097. }
  2098. }
  2099. .bottom {
  2100. // text-align: center;
  2101. background: white;
  2102. margin: 20px 20px 0 20px;
  2103. // border-radius: 10px;
  2104. padding-bottom: 20px;
  2105. .img1,
  2106. .img2 {
  2107. width: 200px;
  2108. padding: 20px;
  2109. }
  2110. .video-content {
  2111. width: 100%;
  2112. }
  2113. .video1 {
  2114. text-align: center;
  2115. }
  2116. }
  2117. /deep/.title_css .el-dialog__header {
  2118. text-align: center !important;
  2119. }
  2120. </style>