weighingManagementrecord.vue 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398
  1. <!--检斤管理-->
  2. <template>
  3. <div>
  4. <BaseHeaderLayout :leftSpan="8">
  5. <template slot="left">
  6. <el-upload style="margin-left: 8px;" class="upload-demo inline-block margin-right-10" action=""
  7. :on-change="importClick" :show-file-list="false"
  8. accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
  9. :auto-upload="false">
  10. <ws-button type="primary">导入(销售)</ws-button>
  11. </el-upload>
  12. </template>
  13. <template slot="left">
  14. <el-upload style="margin-left: 8px;" class="upload-demo inline-block margin-right-10" action=""
  15. :on-change="importClickYk" :show-file-list="false"
  16. accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
  17. :auto-upload="false">
  18. <ws-button type="primary">导入(移库)</ws-button>
  19. </el-upload>
  20. </template>
  21. <!-- <template slot="left"> </template> -->
  22. <template slot="right">
  23. <el-select class='select' filterable v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType">
  24. <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  25. style="color: #8890b1" />
  26. </el-select>
  27. <ws-input class='findinput' @keyup.enter.native="find()" v-model="searchKeyWord" placeholder="可按业务编号、合同编号、车牌号查找"
  28. clearable maxlength="500" type="input">
  29. </ws-input>
  30. <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
  31. vertical-align: text-top;
  32. position: relative;
  33. top: 0px;
  34. left: -8px;
  35. " src="../../../public/img/sousuo.png" alt="" /></ws-button>
  36. </template>
  37. </BaseHeaderLayout>
  38. <el-table :data="weighingList" style="width: 100%; margin-top: 20px" ref="weighingList" border height="calc(100% - 110px)">
  39. <el-table-column type="index" label="序号" width="50">
  40. <template scope="scope">
  41. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  42. <span v-else>{{ scope.$index + 1 }}</span>
  43. </template>
  44. </el-table-column>
  45. <el-table-column prop="inOutTaskNo" label="任务编号" width="170"></el-table-column>
  46. <el-table-column prop="number" label="业务编号" width="170"></el-table-column>
  47. <el-table-column prop="contractNo" width="140" label="合同编号/移库编号">
  48. <template scope="scope">
  49. <span v-if="scope.row.contractNo">{{ scope.row.contractNo }}</span>
  50. <span v-else>{{ scope.row.moveTaskNo }}</span>
  51. </template></el-table-column>
  52. <el-table-column prop="goodsName" label="货名"></el-table-column>
  53. <el-table-column prop="carNumber" label="车牌号"></el-table-column>
  54. <el-table-column prop="grossWeight" label="毛重(公斤)">
  55. </el-table-column>
  56. <el-table-column prop="tare" label="皮重(公斤)">
  57. </el-table-column>
  58. <el-table-column prop="buckleMiscellaneous" label="扣重(公斤)">
  59. </el-table-column>
  60. <el-table-column prop="netWeight" label="净重(公斤)">
  61. </el-table-column>
  62. <!-- <el-table-column prop="binNumber" label="仓位号"></el-table-column>
  63. <el-table-column prop="storageNumber" label="囤位号"></el-table-column> -->
  64. <el-table-column prop="secretaryWeigher" label="司称员"></el-table-column>
  65. <el-table-column prop="grossDate" width="140" label="检斤时间">
  66. <template slot-scope="scope">
  67. {{scope.row.grossDate}}
  68. <span v-if="scope.row.grossDate == null">
  69. {{scope.row.tareDate}}
  70. </span>
  71. </template>
  72. </el-table-column>
  73. <!-- <el-table-column prop="addressUrl" label="附件">
  74. <template slot-scope="scope">
  75. <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  76. src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
  77. <span v-if="scope.row.addressUrlArray != null">
  78. {{scope.row.addressUrlArray.length == 0? "":scope.row.addressUrlArray.length}}
  79. </span>
  80. </template>
  81. </el-table-column> -->
  82. <el-table-column prop="status" label="状态"></el-table-column>
  83. <el-table-column width="400" prop="contractNo1" label="操作">
  84. <template slot-scope="scope">
  85. <!-- <el-button @click="weighing(scope.row, 1)" v-if="scope.row.status != '已质检'"
  86. v-hasPermission="`outbound.acquisitionWeightOut.mao`">毛重</el-button>
  87. <el-button @click="weighing(scope.row, 2)" v-if="scope.row.status == '已称皮重'"
  88. v-hasPermission="`outbound.acquisitionWeightOut.weight`"> 皮重</el-button> -->
  89. <el-button @click="print(scope.row)"
  90. v-hasPermission="`outbound.acquisitionWeightOut.view`">打印</el-button>
  91. <el-button @click="del(scope.row)" v-if="scope.row.status == '已称皮重'"
  92. v-hasPermission="`outbound.acquisitionWeightOut.view`">删除</el-button>
  93. <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchange(scope.row)" v-if="scope.row.status == '已称皮重'">换仓</el-button>
  94. <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchangeNo(scope.row)" v-if="scope.row.status == '已称皮重'">换任务号</el-button>
  95. <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="returnBack(scope.row)" v-if="scope.row.status == '已称毛重'">退回</el-button>
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. <div style="text-align: center">
  100. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  101. :page-sizes="[20, 30, 50, 100, 500, 1000, 9999]" layout="total, sizes, prev, pager, next, jumper"
  102. :total="deptBudgetTotal">
  103. </el-pagination>
  104. </div>
  105. <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
  106. @on-cancel="handleClose">
  107. <ws-upload ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
  108. accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
  109. </WinseaContentModal>
  110. <div class="mask" v-show="isShowPrintType"></div>
  111. <div class="print-type" v-show="isShowPrintType">
  112. <div class="print-type-content">
  113. <div class="print-type-title">请选择打印类型</div>
  114. <div class="ew-print" v-if="checked||(!ddchecked&&!checked)">
  115. <div class="row">
  116. <div>我司发货单位:</div>
  117. <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
  118. <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
  119. </el-option>
  120. </el-select>
  121. </div>
  122. <div class="row">
  123. <div>我司收货单位:</div>
  124. <el-select v-model="myCompanyCustomer" disabled style="width: 75%;">
  125. </el-select>
  126. </div>
  127. </div>
  128. <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='杜尔伯特家禾库'||warehouseName=='洮南新友谊兴旺库'||warehouseName=='甘南宏旗库'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
  129. <div class="print-type-ew">
  130. <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
  131. <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
  132. </div>
  133. <div class="ew-print" v-if="printSeparately">
  134. <div class="row">
  135. <div>额外发货单位:</div>
  136. <!-- <div>{{companyName}}</div> -->
  137. <el-select v-model="ewCustomer" placeholder="请选择" style="width: 75%;">
  138. <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
  139. </el-option>
  140. </el-select>
  141. </div>
  142. <div class="row">
  143. <div>额外收货单位:</div>
  144. <!-- <div>{{companyNameEW}}</div> -->
  145. <el-select v-model="companyNameEW" placeholder="请选择" style="width: 75%;">
  146. <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
  147. :value="item.value">
  148. </el-option>
  149. </el-select>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. <div class="bottom-btn">
  155. <el-button @click="typePrintClick">确定</el-button>
  156. <el-button @click="typePrintCannelClick">取消</el-button>
  157. </div>
  158. </div>
  159. <el-dialog
  160. width="70%"
  161. class="title_css"
  162. center
  163. :visible.sync="isShowPrint"
  164. title="出库检斤单"
  165. @opened="opendBtn"
  166. @close="closeDialog"
  167. :close-on-click-modal="false"
  168. >
  169. <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
  170. <div style="text-align: center">
  171. <el-button type="primary" @click="closePrint">关闭</el-button>
  172. <el-button type="primary" @click="printSmall">打印小票</el-button>
  173. <el-button type="primary" @click="printBig">打印单据</el-button>
  174. </div>
  175. </el-dialog>
  176. <el-dialog
  177. title="提示"
  178. :visible.sync="dialogVisible"
  179. width="30%"
  180. :before-close="handleClose1">
  181. <div style="text-align:center">
  182. <el-select filterable clearable v-model="binNumber" placeholder="请选择仓位" class="typeselect"
  183. @change="binNumberChange">
  184. <el-option v-for="item in binnumberList" :key="item.binNumber" :label="item.binNumber"
  185. :value="item.binNumber" />
  186. </el-select>
  187. </div>
  188. <span slot="footer" class="dialog-footer">
  189. <el-button @click="dialogVisible = false">取 消</el-button>
  190. <el-button type="primary" @click="dialogVisibleconfirm">确 定</el-button>
  191. </span>
  192. </el-dialog>
  193. <el-dialog
  194. title="提示"
  195. :visible.sync="dialogVisible1"
  196. width="30%"
  197. :before-close="handleClose2">
  198. <div style="text-align:center">
  199. <el-form ref="form" label-width="110px">
  200. <el-form-item label="任务编号">
  201. <el-select filterable clearable v-model="inOutTaskNo" placeholder="请选择任务号" class="typeselect"
  202. @change="taskNoChange">
  203. <el-option v-for="item in taskNolist" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
  204. :value="item.inOutTaskNo" />
  205. </el-select>
  206. </el-form-item>
  207. <el-form-item label="合同编号">
  208. <el-input v-model="contractNo" placeholder="合同编号" :disabled="disabled" maxlength="15">
  209. </el-input>
  210. </el-form-item>
  211. </el-form>
  212. </div>
  213. <span slot="footer" class="dialog-footer">
  214. <el-button @click="dialogVisible1 = false">取 消</el-button>
  215. <el-button type="primary" @click="dialogVisibleconfirm1">确 定</el-button>
  216. </span>
  217. </el-dialog>
  218. </div>
  219. </template>
  220. <script>
  221. import {
  222. getweighingList,
  223. selectWarehouseSelf,
  224. delelteWeighing,
  225. getweighing,
  226. changeNo,
  227. changeTaskNo,
  228. importWordSale,
  229. importWordYk,
  230. goBack
  231. } from '@/model/outboundManagement/index'
  232. import {
  233. getReceiptTaskNo,
  234. } from '@/model/warehouse/index'
  235. import {
  236. EventBus
  237. } from 'base-core-lib'
  238. import {
  239. getcomp
  240. } from '@/model/indexRx'
  241. import WsUpload from '@/components/WsUpload'
  242. import weightCheckPrint from './component/weightCheckPrint.vue'
  243. import inspectInfoPrint from './component/inspectInfoPrint.vue'
  244. import html2canvas from 'html2canvas'
  245. export default {
  246. components: {
  247. WsUpload,
  248. inspectInfoPrint,
  249. weightCheckPrint
  250. },
  251. data() {
  252. return {
  253. //分页
  254. dialogViewSpareMoney: false,
  255. currentPage: 1,
  256. pageSize: 20,
  257. inspect:{},
  258. deptCircularPage: {},
  259. deptBudgetTotal: 0,
  260. paymentForm: false,
  261. isShowPrint:false,
  262. paymentForm1: false,
  263. weighingList: [],
  264. searchKeyWord: '',
  265. searchType: [],
  266. warehouseName: '',
  267. isShowPrintType: false,
  268. value1: '', //选择时间
  269. warehouseList: [],
  270. warehouseId: '',
  271. accessoryTFs: false,
  272. appendixIdss: [],
  273. addressUrls: [],
  274. compId: localStorage.getItem('ws-pf_compId'),
  275. dialogVisible:false,
  276. dialogVisible1:false,
  277. binNumber:'',
  278. inOutTaskNo:'',
  279. contractNo:'',
  280. disabled: true,
  281. binnumberList:[],
  282. taskNolist:[],
  283. cangweiNum:'',
  284. contractNum:'',
  285. positionId:'',
  286. warehouseList1:[],
  287. ewCustomerOptions: [{
  288. value: '天津建源供应链管理有限公司',
  289. label: '天津建源供应链管理有限公司'
  290. },{
  291. value: '厦门建发物产有限公司',
  292. label: '厦门建发物产有限公司'
  293. },{
  294. value: '黑龙江中天昊元贸易有限公司',
  295. label: '黑龙江中天昊元贸易有限公司'
  296. }, {
  297. value: '黑龙江利润元粮食贸易有限公司',
  298. label: '黑龙江利润元粮食贸易有限公司'
  299. }, {
  300. value: '黑龙江众利合粮食贸易有限公司',
  301. label: '黑龙江众利合粮食贸易有限公司'
  302. }, {
  303. value: '黑龙江鑫满仓粮食贸易有限公司',
  304. label: '黑龙江鑫满仓粮食贸易有限公司'
  305. },{
  306. value: '黑龙江欣洋粮食贸易有限公司',
  307. label: '黑龙江欣洋粮食贸易有限公司'
  308. },{
  309. value: '黑龙江谷香粮食贸易有限公司',
  310. label: '黑龙江谷香粮食贸易有限公司'
  311. },{
  312. value: '黑龙江秋收有限公司',
  313. label: '黑龙江秋收有限公司'
  314. }, {
  315. value: '黑龙江益储益运粮食贸易有限公司',
  316. label: '黑龙江益储益运粮食贸易有限公司'
  317. }, {
  318. value: '黑龙江启兴粮食贸易有限公司',
  319. label: '黑龙江启兴粮食贸易有限公司'
  320. }],
  321. companyNameOptions: [
  322. {
  323. value: '黑龙江中天昊元贸易有限公司',
  324. label: '黑龙江中天昊元贸易有限公司'
  325. }, {
  326. value: '黑龙江利润元粮食贸易有限公司',
  327. label: '黑龙江利润元粮食贸易有限公司'
  328. }, {
  329. value: '黑龙江众利合粮食贸易有限公司',
  330. label: '黑龙江众利合粮食贸易有限公司'
  331. }, {
  332. value: '黑龙江鑫满仓粮食贸易有限公司',
  333. label: '黑龙江鑫满仓粮食贸易有限公司'
  334. },{
  335. value: '黑龙江欣洋粮食贸易有限公司',
  336. label: '黑龙江欣洋粮食贸易有限公司'
  337. },{
  338. value: '黑龙江谷香粮食贸易有限公司',
  339. label: '黑龙江谷香粮食贸易有限公司'
  340. },{
  341. value: '黑龙江秋收有限公司',
  342. label: '黑龙江秋收有限公司'
  343. }, {
  344. value: '黑龙江益储益运粮食贸易有限公司',
  345. label: '黑龙江益储益运粮食贸易有限公司'
  346. }, {
  347. value: '黑龙江启兴粮食贸易有限公司',
  348. label: '黑龙江启兴粮食贸易有限公司'
  349. }],
  350. companyNameEWOptions: [{
  351. value: '黑龙江中天昊元贸易有限公司',
  352. label: '黑龙江中天昊元贸易有限公司'
  353. }, {
  354. value: '黑龙江利润元粮食贸易有限公司',
  355. label: '黑龙江利润元粮食贸易有限公司'
  356. }, {
  357. value: '黑龙江众利合粮食贸易有限公司',
  358. label: '黑龙江众利合粮食贸易有限公司'
  359. }, {
  360. value: '黑龙江鑫满仓粮食贸易有限公司',
  361. label: '黑龙江鑫满仓粮食贸易有限公司'
  362. },{
  363. value: '厦门建发物产有限公司',
  364. label: '厦门建发物产有限公司'
  365. },{
  366. value: '黑龙江欣洋粮食贸易有限公司',
  367. label: '黑龙江欣洋粮食贸易有限公司'
  368. },{
  369. value: '天津建源供应链管理有限公司',
  370. label: '天津建源供应链管理有限公司'
  371. }],
  372. companyName: '黑龙江中天昊元贸易有限公司',
  373. companyNameEW: '黑龙江利润元粮食贸易有限公司',
  374. ewCustomer: '厦门建发物产有限公司',
  375. ewradio: '',
  376. ddchecked: false,
  377. checked: false,
  378. myCompanyCustomer:'',
  379. printSeparately: false,
  380. jjSelectPrintList: [],
  381. }
  382. },
  383. activated() {
  384. getcomp({userMobilePhone:JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')).loginInfo.userMobilePhone}).toPromise().then((res)=>{
  385. this.compNameoptions=res
  386. if (this.compNameoptions.length>0) {
  387. var company=this.compNameoptions
  388. var extra=company.filter((item)=>{
  389. return item!='黑龙江中天昊元贸易有限公司'
  390. &&item!='黑龙江利润元粮食贸易有限公司'
  391. &&item!= '黑龙江众利合粮食贸易有限公司'
  392. &&item!='黑龙江鑫满仓粮食贸易有限公司'
  393. &&item!='黑龙江谷香粮食贸易有限公司'
  394. &&item!='黑龙江秋收有限公司'
  395. &&item!= '黑龙江欣洋粮食贸易有限公司'
  396. &&item!='黑龙江益储益运粮食贸易有限公司'
  397. &&item!='黑龙江启兴粮食贸易有限公司'
  398. })
  399. if(extra.length>0){
  400. this.companyNameOptions=[
  401. {
  402. value: '黑龙江中天昊元贸易有限公司',
  403. label: '黑龙江中天昊元贸易有限公司'
  404. }, {
  405. value: '黑龙江利润元粮食贸易有限公司',
  406. label: '黑龙江利润元粮食贸易有限公司'
  407. }, {
  408. value: '黑龙江众利合粮食贸易有限公司',
  409. label: '黑龙江众利合粮食贸易有限公司'
  410. }, {
  411. value: '黑龙江鑫满仓粮食贸易有限公司',
  412. label: '黑龙江鑫满仓粮食贸易有限公司'
  413. },{
  414. value: '黑龙江欣洋粮食贸易有限公司',
  415. label: '黑龙江欣洋粮食贸易有限公司'
  416. },{
  417. value: '黑龙江谷香粮食贸易有限公司',
  418. label: '黑龙江谷香粮食贸易有限公司'
  419. },{
  420. value: '黑龙江秋收有限公司',
  421. label: '黑龙江秋收有限公司'
  422. }, {
  423. value: '黑龙江益储益运粮食贸易有限公司',
  424. label: '黑龙江益储益运粮食贸易有限公司'
  425. }, {
  426. value: '黑龙江启兴粮食贸易有限公司',
  427. label: '黑龙江启兴粮食贸易有限公司'
  428. }]
  429. this.ewCustomerOptions= [
  430. {
  431. value: '天津建源供应链管理有限公司',
  432. label: '天津建源供应链管理有限公司'
  433. },{
  434. value: '厦门建发物产有限公司',
  435. label: '厦门建发物产有限公司'
  436. },{
  437. value: '黑龙江中天昊元贸易有限公司',
  438. label: '黑龙江中天昊元贸易有限公司'
  439. }, {
  440. value: '黑龙江利润元粮食贸易有限公司',
  441. label: '黑龙江利润元粮食贸易有限公司'
  442. }, {
  443. value: '黑龙江众利合粮食贸易有限公司',
  444. label: '黑龙江众利合粮食贸易有限公司'
  445. }, {
  446. value: '黑龙江鑫满仓粮食贸易有限公司',
  447. label: '黑龙江鑫满仓粮食贸易有限公司'
  448. },{
  449. value: '黑龙江欣洋粮食贸易有限公司',
  450. label: '黑龙江欣洋粮食贸易有限公司'
  451. },{
  452. value: '黑龙江谷香粮食贸易有限公司',
  453. label: '黑龙江谷香粮食贸易有限公司'
  454. },{
  455. value: '黑龙江秋收有限公司',
  456. label: '黑龙江秋收有限公司'
  457. }, {
  458. value: '黑龙江益储益运粮食贸易有限公司',
  459. label: '黑龙江益储益运粮食贸易有限公司'
  460. }, {
  461. value: '黑龙江启兴粮食贸易有限公司',
  462. label: '黑龙江启兴粮食贸易有限公司'
  463. },{
  464. value: '天津建源供应链管理有限公司',
  465. label: '天津建源供应链管理有限公司'
  466. }]
  467. this.companyNameEWOptions=[
  468. {
  469. value: '黑龙江中天昊元贸易有限公司',
  470. label: '黑龙江中天昊元贸易有限公司'
  471. }, {
  472. value: '黑龙江利润元粮食贸易有限公司',
  473. label: '黑龙江利润元粮食贸易有限公司'
  474. }, {
  475. value: '黑龙江众利合粮食贸易有限公司',
  476. label: '黑龙江众利合粮食贸易有限公司'
  477. }, {
  478. value: '黑龙江鑫满仓粮食贸易有限公司',
  479. label: '黑龙江鑫满仓粮食贸易有限公司'
  480. },{
  481. value: '黑龙江欣洋粮食贸易有限公司',
  482. label: '黑龙江欣洋粮食贸易有限公司'
  483. },{
  484. value: '黑龙江谷香粮食贸易有限公司',
  485. label: '黑龙江谷香粮食贸易有限公司'
  486. },{
  487. value: '黑龙江秋收有限公司',
  488. label: '黑龙江秋收有限公司'
  489. }, {
  490. value: '黑龙江益储益运粮食贸易有限公司',
  491. label: '黑龙江益储益运粮食贸易有限公司'
  492. }, {
  493. value: '黑龙江启兴粮食贸易有限公司',
  494. label: '黑龙江启兴粮食贸易有限公司'
  495. },{
  496. value: '天津建源供应链管理有限公司',
  497. label: '天津建源供应链管理有限公司'
  498. }]
  499. this.companyName=extra[0]
  500. this.companyNameEW=extra[0]
  501. this.ewCustomer=extra[0]
  502. for (let i = 0; i < extra.length; i++) {
  503. this.ewCustomerOptions.push({value: extra[i],label:extra[i]})
  504. this.companyNameOptions.push({value: extra[i],label:extra[i]})
  505. this.companyNameEWOptions.push({value: extra[i],label:extra[i]})
  506. }
  507. }
  508. }
  509. })
  510. this.selectWarehouse()
  511. this.showType = this.isShow
  512. },
  513. methods: {
  514. changeEw(e) {
  515. this.ddchecked = false
  516. if (e) {
  517. this.printSeparately = true
  518. } else {
  519. this.printSeparately = false
  520. }
  521. },
  522. changeEwDD(e) {
  523. this.checked = false
  524. if (e) {
  525. this.printSeparately = true
  526. } else {
  527. this.printSeparately = false
  528. }
  529. },
  530. typePrintCannelClick() {
  531. this.onePrint = false //单个打印标识
  532. this.dialogDataList = [] //打个打印取消时数组至空
  533. this.isShowPrintType = false
  534. },
  535. async typePrintClick(type) {
  536. if (this.onePrint) { //判断是否是单个打印
  537. getweighing({
  538. id: this.idPrint
  539. })
  540. .toPromise()
  541. .then((response) => {
  542. this.dialogDataList = [] //点击确认时先清空要打印的数组
  543. this.dialogData = response
  544. if (response.compName == '黑龙江秋收有限公司') {
  545. this.dialogData.compName = '黑龙江中天昊元贸易有限公司'
  546. }
  547. if (this.checked) {
  548. if(this.dialogData&&!this.dialogData.customer&&this.dialogData.contractManagement){
  549. this.dialogData.customer = this.dialogData.contractManagement.seller
  550. }
  551. this.dialogDataList.push(this.dialogData)
  552. var _datas = JSON.stringify(this.dialogData)
  553. _datas = JSON.parse(_datas)
  554. _datas.compName =this.ewCustomer
  555. _datas.customer = this.companyNameEW
  556. this.dialogDataList.push(_datas)
  557. this.printBig('', this.radio)
  558. } else if (this.ddchecked) {
  559. _datas = this.dialogData
  560. _datas.compName = this.companyNameEW;
  561. _datas.customer = this.ewCustomer
  562. this.dialogDataList.push(_datas)
  563. this.printBig(1, this.radio)
  564. } else {
  565. this.dialogData.companyName = this.companyName
  566. if(this.dialogData&&!this.dialogData.customer&&this.dialogData.contractManagement){
  567. this.dialogData.customer = this.dialogData.contractManagement.buyer
  568. }
  569. this.dialogDataList.push(this.dialogData)
  570. this.printBig('', this.radio)
  571. }
  572. })
  573. .catch((response) => {
  574. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  575. })
  576. } else {
  577. // if (this.isExcelPrint) {
  578. // this.printBig(2, this.radio)
  579. // this.isExcelPrint = false
  580. // } else {
  581. this.jjSelectPrintList = []
  582. let index1 = 0;
  583. for (let i = 0; i < this.modification.length; i++) {
  584. await getweighing({
  585. id: this.modification[i].id
  586. })
  587. .toPromise()
  588. .then((response) => {
  589. index1++;
  590. response.compName = this.companyName
  591. if (response.compName == '黑龙江秋收有限公司') {
  592. response.compName = '黑龙江中天昊元贸易有限公司'
  593. }
  594. this.jjSelectPrintList.push(response)
  595. if (index1 == this.modification.length) {
  596. this.printBig(1, this.radio)
  597. }
  598. })
  599. .catch((response) => {})
  600. }
  601. // }
  602. }
  603. },
  604. print(row, type, pageType) {
  605. //打印
  606. if (type == 1) { //
  607. if (this.modification.length == 0) {
  608. this.$message.error('请选择批量打印的条目!')
  609. return
  610. }
  611. for (let _num = 0; _num < this.modification.length; _num++) {
  612. if (this.modification[_num].serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '杜尔伯特家禾库'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='甘南宏旗库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库')) {
  613. if (this.modification[_num].seller && this.modification[_num].buyer) {
  614. let cang = {}
  615. cang.value = this.modification[_num].seller
  616. cang.label = this.modification[_num].seller
  617. if (this.check(this.modification[_num].seller, 1)) {
  618. this.ewCustomerOptions.push(cang)
  619. }
  620. let cang1 = {}
  621. cang1.value = this.modification[_num].buyer
  622. cang1.label = this.modification[_num].buyer
  623. if (this.check(this.modification[_num].buyer, 2)) {
  624. this.companyNameEWOptions.push(cang1)
  625. }
  626. }
  627. }
  628. }
  629. this.isShowPrintType = true
  630. } else {
  631. if (row.serviceManagementType == '2' && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '杜尔伯特家禾库'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='甘南宏旗库'|| this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库')) {
  632. if (row.seller && row.buyer) {
  633. let cang = {}
  634. cang.value = row.seller
  635. cang.label = row.seller
  636. if (this.check(row.seller, 1)) {
  637. this.ewCustomerOptions.push(cang)
  638. }
  639. let cang1 = {}
  640. cang1.value = row.buyer
  641. cang1.label = row.buyer
  642. if (this.check(row.buyer, 2)) {
  643. this.companyNameEWOptions.push(cang1)
  644. }
  645. this.myCompanyCustomer = row.buyer
  646. }
  647. }
  648. this.idPrint = row.id
  649. this.isShowPrintType = true
  650. this.onePrint = true //单个打印标识
  651. }
  652. },
  653. check(name, type) {
  654. if (type == 1) {
  655. for (var _tmp = 0; _tmp < this.ewCustomerOptions.length; _tmp++) {
  656. if (this.ewCustomerOptions[_tmp].label == name) {
  657. return false
  658. }
  659. }
  660. return true
  661. } else if (type == 2) {
  662. for (var _tmp = 0; _tmp < this.companyNameEWOptions.length; _tmp++) {
  663. if (this.companyNameEWOptions[_tmp].label == name) {
  664. return false
  665. }
  666. }
  667. return true
  668. }
  669. },
  670. importClick(file, fileList) {
  671. this.fileTemp = file.raw
  672. let fileName = file.raw.name
  673. let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
  674. // 判断上传文件格式
  675. if (this.fileTemp) {
  676. if (fileType == 'xlsx' || fileType == 'xls') {
  677. this.importf(this.fileTemp)
  678. } else {
  679. this.$message({
  680. type: 'warning',
  681. message: '附件格式错误,请删除后重新上传!',
  682. })
  683. }
  684. } else {
  685. this.$message({
  686. type: 'warning',
  687. message: '请上传附件!',
  688. })
  689. }
  690. },
  691. importf(obj) {
  692. this.excelFreightspace = []
  693. // this.dialogVisible = true;
  694. let _this = this;
  695. let inputDOM = this.$refs.inputer; // 通过DOM取文件数据
  696. this.file = event.currentTarget.files[0];
  697. var rABS = false; //是否将文件读取为二进制字符串
  698. var f = this.file;
  699. var reader = new FileReader();
  700. //if (!FileReader.prototype.readAsBinaryString) {
  701. FileReader.prototype.readAsBinaryString = function(f) {
  702. var binary = '';
  703. var rABS = false; //是否将文件读取为二进制字符串
  704. var pt = this;
  705. var wb; //读取完成的数据
  706. var outdata;
  707. var reader = new FileReader();
  708. reader.onload = function(e) {
  709. var bytes = new Uint8Array(reader.result);
  710. var length = bytes.byteLength;
  711. for (var i = 0; i < length; i++) {
  712. binary += String.fromCharCode(bytes[i]);
  713. }
  714. var XLSX = require('xlsx');
  715. if (rABS) {
  716. wb = XLSX.read(btoa(fixdata(binary)), { //手动转化
  717. type: 'base64',
  718. cellDates: true
  719. });
  720. } else {
  721. wb = XLSX.read(binary, {
  722. type: 'binary'
  723. });
  724. }
  725. // outdata就是你想要的东西 excel导入的数据
  726. outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
  727. // excel 数据再处理
  728. let arr = []
  729. outdata.map(v => {
  730. // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
  731. let jsonString = JSON.stringify(v).replace(/\//g, '').replace(/\s/ig, '');
  732. v = JSON.parse(jsonString);
  733. let obj = {}
  734. //xxx代表列名
  735. obj.number = v.业务编号
  736. obj.inOutTaskNo = v.出库任务编号
  737. obj.outType = v.运输方式
  738. obj.carNumber = v.车牌号
  739. obj.grossWeight = v.毛重
  740. obj.tare = v.皮重
  741. obj.netWeight = v.净重
  742. obj.contractNo = v.销售合同号
  743. obj.contractPrice = v.销售合同单价
  744. obj.grossDate = _this.formatDate(v.出库日期, '-')
  745. obj.settleWeight = v.结算数量
  746. obj.settlePrice = v.结算单价
  747. obj.settleDate = v.结算日期
  748. obj.settleMoney = v.结算金额
  749. _this.excelFreightspace.push(obj)
  750. })
  751. if (_this.excelFreightspace) {
  752. importWordSale({
  753. warehouseName: _this.warehouseName,
  754. weighingManagementList: _this.excelFreightspace
  755. }).toPromise()
  756. .then((response) => {
  757. if (response == 'ok') {
  758. this.$notify({
  759. title: '成功',
  760. message: '导入成功',
  761. type: 'success'
  762. });
  763. _this.getList()
  764. }
  765. })
  766. }
  767. }
  768. reader.readAsArrayBuffer(f);
  769. }
  770. if (rABS) {
  771. reader.readAsArrayBuffer(f);
  772. } else {
  773. reader.readAsBinaryString(f);
  774. }
  775. },
  776. importClickYk(file, fileList) {
  777. this.fileTemp = file.raw
  778. let fileName = file.raw.name
  779. let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
  780. // 判断上传文件格式
  781. if (this.fileTemp) {
  782. if (fileType == 'xlsx' || fileType == 'xls') {
  783. this.importfYk(this.fileTemp)
  784. } else {
  785. this.$message({
  786. type: 'warning',
  787. message: '附件格式错误,请删除后重新上传!',
  788. })
  789. }
  790. } else {
  791. this.$message({
  792. type: 'warning',
  793. message: '请上传附件!',
  794. })
  795. }
  796. },
  797. importfYk(obj) {
  798. this.excelFreightspace = []
  799. // this.dialogVisible = true;
  800. let _this = this;
  801. let inputDOM = this.$refs.inputer; // 通过DOM取文件数据
  802. this.file = event.currentTarget.files[0];
  803. var rABS = false; //是否将文件读取为二进制字符串
  804. var f = this.file;
  805. var reader = new FileReader();
  806. //if (!FileReader.prototype.readAsBinaryString) {
  807. FileReader.prototype.readAsBinaryString = function(f) {
  808. var binary = '';
  809. var rABS = false; //是否将文件读取为二进制字符串
  810. var pt = this;
  811. var wb; //读取完成的数据
  812. var outdata;
  813. var reader = new FileReader();
  814. reader.onload = function(e) {
  815. var bytes = new Uint8Array(reader.result);
  816. var length = bytes.byteLength;
  817. for (var i = 0; i < length; i++) {
  818. binary += String.fromCharCode(bytes[i]);
  819. }
  820. var XLSX = require('xlsx');
  821. if (rABS) {
  822. wb = XLSX.read(btoa(fixdata(binary)), { //手动转化
  823. type: 'base64',
  824. cellDates: true
  825. });
  826. } else {
  827. wb = XLSX.read(binary, {
  828. type: 'binary'
  829. });
  830. }
  831. // outdata就是你想要的东西 excel导入的数据
  832. outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
  833. // excel 数据再处理
  834. let arr = []
  835. outdata.map(v => {
  836. // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
  837. let jsonString = JSON.stringify(v).replace(/\//g, '').replace(/\s/ig, '');
  838. v = JSON.parse(jsonString);
  839. let obj = {}
  840. //xxx代表列名
  841. obj.number = v.业务编号
  842. obj.inOutTaskNo = v.出库任务编号
  843. obj.outType = v.运输方式
  844. obj.carNumber = v.车牌号
  845. obj.grossWeight = v.毛重
  846. obj.tare = v.皮重
  847. obj.netWeight = v.净重
  848. obj.grossDate = _this.formatDate(v.出库日期, '-')
  849. _this.excelFreightspace.push(obj)
  850. })
  851. if (_this.excelFreightspace) {
  852. importWordYk({
  853. warehouseName: _this.warehouseName,
  854. weighingManagementList: _this.excelFreightspace
  855. }).toPromise()
  856. .then((response) => {
  857. if (response == 'ok') {
  858. this.$notify({
  859. title: '成功',
  860. message: '导入成功',
  861. type: 'success'
  862. });
  863. _this.getList()
  864. }
  865. })
  866. }
  867. }
  868. reader.readAsArrayBuffer(f);
  869. }
  870. if (rABS) {
  871. reader.readAsArrayBuffer(f);
  872. } else {
  873. reader.readAsBinaryString(f);
  874. }
  875. },
  876. formatDate(numb, format) {
  877. const old = numb - 1;
  878. const t = Math.round((old - Math.floor(old)) * 24 * 60 * 60);
  879. const time = new Date(1900, 0, old, 0, 0, t)
  880. const year = time.getFullYear();
  881. const month = time.getMonth() + 1;
  882. const date = time.getDate();
  883. return year + format + (month < 10 ? '0' + month : month) + format + (date < 10 ? '0' + date : date) +
  884. ' 00:00:00'
  885. },
  886. returnBack(item){
  887. goBack({id:item.id}).toPromise()
  888. .then((response) => {
  889. this.$notify.success({
  890. title: '成功',
  891. message: '退回成功',
  892. })
  893. this.getList()
  894. }) .catch(() => {
  895. return false
  896. })
  897. },
  898. binNumberChange(e){
  899. this.binNumber = e
  900. for(let i = 0 ; i < this.binnumberList.length ; i++){
  901. if(this.binNumber == this.binnumberList[i].binNumber){
  902. this.positionId = this.binnumberList[i].id
  903. }
  904. }
  905. },
  906. taskNoChange(e){
  907. this.inOutTaskNo = e
  908. for(let i = 0 ; i < this.taskNolist.length ; i++){
  909. if(this.inOutTaskNo == this.taskNolist[i].inOutTaskNo){
  910. if(this.taskNolist[i].contractNo){
  911. this.contractNo = this.taskNolist[i].contractNo
  912. }
  913. else{
  914. this.contractNo = this.taskNolist[i].moveTaskNo
  915. }
  916. }
  917. }
  918. },
  919. handleClose1(){
  920. this.dialogVisible = false
  921. },
  922. handleClose2(){
  923. this.inOutTaskNo=''
  924. this.dialogVisible1 = false
  925. },
  926. exchange(row){
  927. for(let i = 0 ; i < this.warehouseList1.length; i++ ){
  928. if(this.warehouseName == this.warehouseList1[i].warehouseName){
  929. this.binnumberList = this.warehouseList1[i].positionInfos
  930. }
  931. }
  932. this.id = row.id
  933. this.binNumber = row.binNumber
  934. this.cangweiNum = row.binNumber
  935. this.dialogVisible = true
  936. },
  937. exchangeNo(row){
  938. getReceiptTaskNo({
  939. flag: 1,
  940. warehouseName: this.warehouseName,
  941. })
  942. .toPromise()
  943. .then((response) => {
  944. this.taskNolist = response
  945. })
  946. this.id = row.id
  947. this.contractNo = row.contractNo
  948. this.contractNum = row.contractNo
  949. this.dialogVisible1 = true
  950. },
  951. dialogVisibleconfirm(){
  952. if(this.binNumber == this.cangweiNum){
  953. this.$message.error('已是该仓位无需修改')
  954. return
  955. }
  956. this.$confirm(`确定修改仓位?`, {
  957. cancelButtonText: '取消',
  958. confirmButtonText: '确定',
  959. type: 'warning',
  960. })
  961. .then(() => {
  962. // let _obj = JSON.parse(this.warehouseInOutDetail)
  963. // _obj.binNumber = this.binNumber
  964. changeNo({id:this.id,changePositionId:this.positionId,changeBinNumer:this.binNumber}).toPromise()
  965. .then((response) => {
  966. this.$notify.success({
  967. title: '成功',
  968. message: '修改仓位成功',
  969. })
  970. this.getList()
  971. this.inOutTaskNo=''
  972. this.dialogVisible=false
  973. })
  974. })
  975. .catch(() => {
  976. return false
  977. })
  978. },
  979. dialogVisibleconfirm1(){
  980. // if(this.contractNo == this.contractNum){
  981. // this.$message.error('已是该任务号无需修改')
  982. // return
  983. // }
  984. this.$confirm(`确定修改任务号?`, {
  985. cancelButtonText: '取消',
  986. confirmButtonText: '确定',
  987. type: 'warning',
  988. })
  989. .then(() => {
  990. changeTaskNo({id:this.id,inOutTaskNo:this.inOutTaskNo,contractNo:this.contractNo}).toPromise()
  991. .then((response) => {
  992. this.$notify.success({
  993. title: '成功',
  994. message: '修改任务号成功',
  995. })
  996. this.getList()
  997. this.dialogVisible1=false
  998. })
  999. })
  1000. .catch(() => {
  1001. return false
  1002. })
  1003. },
  1004. warehouseNameChange(e) {
  1005. // this.warehouseName = e
  1006. console.log(this.warehouseList)
  1007. for (let i = 0; i < this.warehouseList.length; i++) {
  1008. if (this.warehouseList[i].value == e) {
  1009. this.warehouseId = this.warehouseList[i].warehouseId
  1010. }
  1011. }
  1012. this.getList()
  1013. },
  1014. weighing(row, num) {
  1015. console.log
  1016. this.$router.push({
  1017. path: 'weighing',
  1018. query: {
  1019. typeNo: num,
  1020. id: row.id,
  1021. number: row.number,
  1022. binNumber: row.binNumber,
  1023. customer: row.customer,
  1024. storageNumber: row.storageNumber,
  1025. carNumber: row.carNumber,
  1026. goodsName: row.goodsName,
  1027. grossWeight: row.grossWeight,
  1028. tare: row.tare,
  1029. netWeight: row.netWeight,
  1030. relationId: row.relationId,
  1031. warehouseId: this.warehouseId,
  1032. warehouseName: this.warehouseName,
  1033. },
  1034. })
  1035. },
  1036. // Reacquire() {
  1037. // //重新获取
  1038. // },
  1039. find() {
  1040. this.getList()
  1041. },
  1042. // dayin(row){
  1043. // getweighing({
  1044. // id: row.id
  1045. // })
  1046. // .toPromise()
  1047. // .then((response) => {
  1048. // this.inspect=response
  1049. // this.isShowPrint=true
  1050. // })
  1051. // },
  1052. handleSizeChange(val) {
  1053. console.log(`每页 ${val} 条`)
  1054. this.pageSize = val
  1055. this.getList()
  1056. },
  1057. handleCurrentChange(val) {
  1058. this.currentPage = val
  1059. console.log(`当前页: ${val}`)
  1060. this.getList()
  1061. },
  1062. printSmall() {
  1063. localStorage.setItem('ck_bd_printData1',JSON.stringify(this.inspect))
  1064. window.open('../../../../static/outWeightPrint.html?type=1')
  1065. },
  1066. printBig(type, radioType) {
  1067. // localStorage.setItem('ck_bd_printData1',JSON.stringify(this.inspect))
  1068. // window.open('../../../../static/outWeightPrint.html?type=2')
  1069. // 打印额外
  1070. localStorage.removeItem('print_out_data')
  1071. localStorage.removeItem('selectPrint_EWjjSelectPrintList')
  1072. localStorage.removeItem('selectPrint_jjSelectPrintList')
  1073. if (this.checked || this.ddchecked) {
  1074. this.makeEWjjSelectPrintList()
  1075. // this.selectEW = true;
  1076. }
  1077. if (type == 1) {
  1078. localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.dialogDataList))
  1079. window.open('../../../../static/weightCheckOutNew.html?type=2&radioType=' + radioType + '&selectEW=' + this
  1080. .checked + '&selectEWDD=' + this.ddchecked)
  1081. } else if (type == 2) {
  1082. localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.excelPrintData))
  1083. window.open('../../../../static/weightCheckOutNew.html?type=2&radioType=' + radioType)
  1084. } else {
  1085. console.log(this.dialogDataList)
  1086. localStorage.setItem('print_out_data',JSON.stringify(this.dialogDataList).replace(/%/g, 'baifenhao'))
  1087. window.open('../../../../static/weightCheckOutNew.html?type=2' )
  1088. }
  1089. },
  1090. makeEWjjSelectPrintList() {
  1091. let _selectPrint_EWjjSelectPrintList = JSON.parse(JSON.stringify(this.dialogDataList));
  1092. for (let i = 0; i < _selectPrint_EWjjSelectPrintList.length; i++) {
  1093. let _data = _selectPrint_EWjjSelectPrintList[i];
  1094. _data.compName = this.companyNameEW;
  1095. _data.customer = this.ewCustomer
  1096. }
  1097. localStorage.setItem('selectPrint_EWjjSelectPrintList', JSON.stringify(_selectPrint_EWjjSelectPrintList))
  1098. },
  1099. opendBtn() {
  1100. // html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  1101. // let dataURL = canvas.toDataURL('image/png')
  1102. // this.imgUrl = dataURL
  1103. // if (this.imgUrl !== '') {
  1104. // let b = this.dataURLtoFile(this.imgUrl, 'printImage')
  1105. // let formdata = new FormData()
  1106. // formdata.append('file', b)
  1107. // axios({
  1108. // method: 'post',
  1109. // url:this.global.uploadPath,
  1110. // data: formdata,
  1111. // }).then((response) => {
  1112. // //编辑接口
  1113. // this.weighingList.pictureAddress = response.data.url
  1114. // tare(this.weighingList)
  1115. // .toPromise()
  1116. // .then((response) => {})
  1117. // })
  1118. // }
  1119. // })
  1120. },
  1121. closeDialog() {
  1122. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  1123. let dataURL = canvas.toDataURL('image/png')
  1124. this.imgUrl = dataURL
  1125. if (this.imgUrl !== '') {
  1126. let b = this.dataURLtoFile(this.imgUrl, 'printImage')
  1127. let formdata = new FormData()
  1128. formdata.append('file', b)
  1129. axios({
  1130. method: 'post',
  1131. url:this.global.uploadPath,
  1132. data: formdata,
  1133. }).then((response) => {
  1134. //编辑接口
  1135. this.weighingList.pictureAddress = response.data.url
  1136. tare(this.weighingList)
  1137. .toPromise()
  1138. .then((response) => {})
  1139. })
  1140. this.dialogTableVisible = true
  1141. }
  1142. })
  1143. this.isShowPrint = false
  1144. // this.$router.push({
  1145. // path: 'weighingManagement'
  1146. // })
  1147. },
  1148. closePrint() {
  1149. this.isShowPrint = false
  1150. // this.$router.push({
  1151. // path: 'weighingManagement'
  1152. // })
  1153. },
  1154. del(row) {
  1155. this.$confirm(`检斤信息删除后不可恢复,是否确定删除?`, {
  1156. cancelButtonText: '取消',
  1157. confirmButtonText: '确定',
  1158. type: 'warning',
  1159. })
  1160. .then(() => {
  1161. delelteWeighing({
  1162. id: row.id
  1163. })
  1164. .toPromise()
  1165. .then((response) => {
  1166. this.$notify.success({
  1167. title: '成功',
  1168. message: '删除成功',
  1169. })
  1170. this.getList()
  1171. })
  1172. .catch((response) => {})
  1173. })
  1174. .catch(() => {
  1175. return false
  1176. })
  1177. },
  1178. selectWarehouse() {
  1179. selectWarehouseSelf({
  1180. compId: localStorage.getItem('ws-pf_compId'),
  1181. })
  1182. .toPromise()
  1183. .then((response) => {
  1184. this.warehouseList1 = response
  1185. this.warehouseList = []
  1186. for (let i = 0; i < response.length; i++) {
  1187. this.warehouseList.push({
  1188. value: response[i].warehouseName,
  1189. warehouseId: response[i].id,
  1190. })
  1191. }
  1192. if(this.$route.query.warehouseName){
  1193. this.warehouseName = this.$route.query.warehouseName
  1194. }else{
  1195. this.warehouseName = response[0].warehouseName
  1196. this.warehouseId = this.warehouseList[0].warehouseId
  1197. }
  1198. this.getList()
  1199. })
  1200. },
  1201. getList() {
  1202. getweighingList({
  1203. compId: localStorage.getItem('ws-pf_compId'),
  1204. currentPage: this.currentPage,
  1205. pageSize: this.pageSize,
  1206. searchKeyWord: this.searchKeyWord,
  1207. warehouseName: this.warehouseName,
  1208. managementType: 3,
  1209. })
  1210. .toPromise()
  1211. .then((response) => {
  1212. this.weighingList = response.records
  1213. this.deptBudgetTotal = response.total
  1214. for (var i = 0; i < response.records.length; i++) {
  1215. if (response.records[i].addressUrl != null) {
  1216. if (response.records[i].addressUrl) {
  1217. response.records[i].addressUrlArray = response.records[i].addressUrl.split(',')
  1218. }
  1219. } else {
  1220. response.records[i].addressUrlArray = []
  1221. }
  1222. }
  1223. for (var i = 0; i < response.records.length; i++) {
  1224. var arr = new Array()
  1225. this.addressUrls[i] = new Array()
  1226. if (this.weighingList.records[i].addressUrl !=
  1227. null) {
  1228. arr = this.weighingList.records[i].addressUrl.split(',')
  1229. this.addressUrls[i] = arr
  1230. }
  1231. }
  1232. })
  1233. .catch((response) => {
  1234. })
  1235. },
  1236. //附件
  1237. fujian(row) {
  1238. if (row.addressUrl === null || row.addressUrl === '') {
  1239. EventBus.$emit(
  1240. 'warning',
  1241. this.$t('system.noticeCircular.NoInformation')
  1242. )
  1243. } else {
  1244. this.accessoryTFs = true
  1245. }
  1246. this.appendixIdss = row.addressUrl
  1247. },
  1248. handleClose() {
  1249. this.dialogViewSpareMoney = false
  1250. },
  1251. },
  1252. }
  1253. </script>
  1254. <style lang="scss" scoped>
  1255. .title {
  1256. font-size: 20px;
  1257. font-weight: 600;
  1258. margin: 20px;
  1259. }
  1260. .ws-info-table {
  1261. border: none;
  1262. }
  1263. .ws-info-table .el-form-item {
  1264. width: 50%;
  1265. border: none;
  1266. }
  1267. .mask {
  1268. background: black;
  1269. width: 100vw;
  1270. height: 100vh;
  1271. position: fixed;
  1272. top: 0;
  1273. z-index: 99;
  1274. opacity: 0.3;
  1275. }
  1276. .print-type-title {
  1277. text-align: center;
  1278. font-size: 18px;
  1279. margin: 20px;
  1280. }
  1281. .bottom-btn {
  1282. display: flex;
  1283. margin-top: 20px;
  1284. justify-content: space-around;
  1285. }
  1286. .print-type-checkbox {
  1287. // padding-left: 20px;
  1288. }
  1289. .print-type {
  1290. position: absolute;
  1291. top: 0;
  1292. bottom: 0;
  1293. left: 0;
  1294. right: 0;
  1295. margin: auto;
  1296. width: 440px;
  1297. height: 320px;
  1298. background: white;
  1299. border-radius: 10px;
  1300. z-index: 999;
  1301. }
  1302. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1303. width: 30%;
  1304. text-align: center;
  1305. background: #ffffff;
  1306. color: #8890b1;
  1307. }
  1308. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1309. border: none;
  1310. }
  1311. /deep/.el-table .el-table__header .cell,
  1312. .el-table .el-table__body .cell {
  1313. text-align: center;
  1314. }
  1315. /deep/.el-table--enable-row-transition .el-table__body td {
  1316. text-align: center;
  1317. }
  1318. .formItem {
  1319. width: 51% !important;
  1320. }
  1321. /deep/.base_header_layout .find.el-button--primary {
  1322. width: 30px;
  1323. border-top-left-radius: 0px;
  1324. border-bottom-left-radius: 0px;
  1325. }
  1326. .findinput{
  1327. margin-left: 20px;
  1328. }
  1329. /deep/.base_header_layout .findinput input {
  1330. border-top-right-radius: 0px;
  1331. border-bottom-right-radius: 0px;
  1332. }
  1333. /deep/.title_css .el-dialog__header{
  1334. text-align: center !important;
  1335. }
  1336. .select{
  1337. width:400px;
  1338. }
  1339. .shdw-style {
  1340. display: flex;
  1341. justify-content: space-between;
  1342. align-items: center;
  1343. padding: 0 20px;
  1344. margin-top: 20px;
  1345. }
  1346. .ew-print {
  1347. padding: 0 20px;
  1348. margin-top: 10px;
  1349. margin-bottom: 15px;
  1350. // display: flex;
  1351. // justify-content: space-between;
  1352. // align-content: center;
  1353. .row {
  1354. display: flex;
  1355. margin-top: 10px;
  1356. align-items: center;
  1357. }
  1358. }
  1359. .sh-address {
  1360. display: flex;
  1361. }
  1362. .print-type-ew {
  1363. display: flex;
  1364. justify-content: space-between;
  1365. padding: 0 20px;
  1366. }
  1367. </style>