123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516 |
- <template>
- <div class="container">
- <el-row>
- <el-col :span="20">
- <h2 class="bg-left title">待完成记录</h2>
- </el-col>
- <el-col :span="4" class="bg-right">
- <el-button
- class="bg-bottom"
- type="primary"
- size="small"
- @click="returnWarehouse()"
- ><img
- width="6"
- height="10"
- style="vertical-align: bottom; margin-right: 3px"
- src="../../../public/img/lujing.png"
- alt=""
- />返回</el-button
- >
- </el-col>
- </el-row>
- <ws-form ref="deptBudgetList" :v-model="deptBudgetList">
- <div class="center">
- <h2 style="padding-left: 20px">
- <img
- style="position: relative; top: 2px"
- width="19"
- height="19"
- src="../../../public/img/cangku.png"
- alt=""
- />
- {{ this.$route.query.warehouseName }}库
- <span class="position" v-show="this.$route.query.warehouseType == 1"> {{ this.$route.query.binNumber }}仓位 </span>
- <span v-show="this.$route.query.warehouseType == 2">(临)</span>
- </h2>
- <el-table :data="improved.records">
- <el-table-column type="index" label="序号">
- <template scope="scope">
- <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
- <span v-else>{{ scope.$index + 1 }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="goodsName" label="货名"> </el-table-column>
- <el-table-column
- prop="grossWeight"
- label="毛重(吨)"
- ></el-table-column>
- <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
- <el-table-column
- prop="netWeight"
- label="净重(吨)"
- ></el-table-column>
- <el-table-column prop="grade" label="品级">
- <template slot-scope="scope">
- <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
- scope.row.grade
- }}</span>
- <span v-if="scope.row.grade == '二等品'" class="second-class">{{
- scope.row.grade
- }}</span>
- <span v-if="scope.row.grade == '三等品'" class="third-class">{{
- scope.row.grade
- }}</span>
- <span v-if="scope.row.grade == '等外'" class="substandard">{{
- scope.row.grade
- }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="inOutDate" label="出入库日期">
- </el-table-column>
- <el-table-column prop="inOutType" label="类型"> </el-table-column>
- <el-table-column prop="contractNo" label="合同编号">
- </el-table-column>
- <el-table-column prop="carNo" label="车牌号"> </el-table-column>
- <el-table-column prop="agent" label="经办人"> </el-table-column>
- <el-table-column prop="backOffice" label="内勤"> </el-table-column>
- <el-table-column prop="updateDate" label="保存时间">
- </el-table-column>
- <el-table-column prop="address" label="操作" width="200">
- <!-- <template scope="scope"> -->
- <!-- <ws-button
- type="primary"
- @click="edits(scope.row)"
- v-hasPermission="
- `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
- "
- >编辑</ws-button
- > -->
- <!-- <ws-button
- type="primary"
- @click="handleDelete(scope.row)"
- v-hasPermission="
- `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
- "
- >删除</ws-button
- > -->
- <!-- </template> -->
- <template slot-scope="scope">
- <div class="record" @click="edits(scope.row)">编辑</div>
- <div class="adjustment" @click="handleDelete(scope.row)">
- 删除
- </div>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right; padding: 10px">
- <el-button
- class="bg-bottom-up"
- type="primary"
- size="small"
- @click="returnWarehouse()"
- >关闭</el-button
- >
- </div>
- </div>
- </ws-form>
- </div>
- </template>
- <script>
- import {
- complete,
- delInOut,
- completeList,
- // deletewarehouse,
- // warehouseName,
- // addstorageputList,
- } from '@/model/warehouse/index'
- // import { downloadFile } from '@/utils/batchDown'
- import Pagination from '@/components/Pagination'
- import WsUpload from '@/components/WsUpload'
- import { dayjs } from 'base-core-lib'
- export default {
- name: 'viewSpareMoney',
- components: {
- WsUpload,
- Pagination,
- },
- watch: {
- vesselId(val) {
- this.getList()
- },
- isShow(val) {
- this.showType = val
- },
- },
- data() {
- return {
- //弹出框
- dialogViewSpareMoney: false,
- dialogApproveFormVisible: false,
- // 船舶类型
- monetaryKey: null,
- // 表格显示数据
- tableDate: [],
- // 是否显示
- showType: true,
- // 年
- year: '',
- deptBudgetTotal: 0,
- currentPage: 1,
- pageSize: 10,
- searchType: 1,
- searchKeyWord: '',
- contractType: 2,
- startDate: null,
- endDate: null,
- deletewarehouse: [],
- improved: [],
- row: [],
- deptBudgetList1: [],
- // 提交类型
- submitType: true,
- selectpackingMethod: {},
- size: 10,
- compId: sessionStorage.getItem('ws-pf_compId'),
- deptCircularPage: {},
- packtypeList: {},
- date: {
- year: dayjs().format('YYYY'),
- month: dayjs().format('MM'),
- },
- contractList: [],
- deptBudgetList: {},
- historyList: [],
- // inOutDate:null,
- pickerBeginDateBefore: {
- disabledDate: (time) => {
- return time.getTime() > Date.now()
- },
- },
- accessoryTFs: false,
- }
- },
- activated() {
- //cg.viewBudget
- //cg.viewSpareMoney
- // this.getVesselData();
- this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
- this.binNumber = this.$route.params.binNumber
- this.deptBudgetList.warehouseType = this.$route.query.warehouseType
- //接参
- this.getList(this.$route.query.baseId, this.$route.query.positionId , this.$route.query.warehouseType)
- this.showType = this.isShow
- },
- methods: {
- //返回按钮
- returnWarehouse() {
- this.$router.push({ path: 'warehouseManagementList' })
- },
- //编辑
- edits(row) {
- if (row.inOutFlag == 2) {
- this.$store.dispatch('app/setdeptBudgetList', row)
- this.$router.push({
- path: 'warehouseManagementPerfectput',
- query: {
- id:row.id,
- agent:row.agent,
- baseId: row.baseId,
- binNumber: row.binNumber,
- carNo:row.carNo,
- compId:row.compId,
- contractNo:row.contractNo,
- goodsName:row.goodsName,
- goodsNameKey:row.goodsNameKey,
- grade:row.grade,
- grossWeight:row.grossWeight,
- inOutDate:row.inOutDate,
- inOutFlag:row.inOutFlag,
- inOutType:row.inOutType,
- inOutTypeKey:row.inOutTypeKey,
- netWeight:row.netWeight,
- positionId: row.positionId,
- statusFlag:row.statusFlag,
- tare:row.tare,
- warehouseName: row.warehouseName,
- warehouseInOutDetail:row.warehouseInOutDetail,
- warehouseType: this.deptBudgetList.warehouseType
- },
- })
- } else if(row.inOutFlag==1){
- this.$store.dispatch('app/setdeptBudgetList', row)
- // this.$store.commit('deptBudgetList',row)
- this.$router.push({
- path: 'warehouseManagementPerfectDelivery',
- query: {
- id:row.id,
- agent:row.agent,
- baseId: row.baseId,
- binNumber: row.binNumber,
- carNo:row.carNo,
- compId:row.compId,
- contractNo:row.contractNo,
- goodsName:row.goodsName,
- goodsNameKey:row.goodsNameKey,
- grade:row.grade,
- grossWeight:row.grossWeight,
- inOutDate:row.inOutDate,
- inOutFlag:row.inOutFlag,
- inOutType:row.inOutType,
- inOutTypeKey:row.inOutTypeKey,
- netWeight:row.netWeight,
- positionId: row.positionId,
- statusFlag:row.statusFlag,
- tare:row.tare,
- warehouseName: row.warehouseName,
- warehouseInOutDetail:row.warehouseInOutDetail,
- warehouseType: this.deptBudgetList.warehouseType,
- }
- })
- }
- },
- dateFormat(fmt, date) {
- let ret
- const opt = {
- 'Y+': date.getFullYear().toString(), // 年
- 'm+': (date.getMonth() + 1).toString(), // 月
- 'd+': date.getDate().toString(), // 日
- 'H+': date.getHours().toString(), // 时
- // "M+": date.getMinutes().toString(), // 分
- // "S+": date.getSeconds().toString() // 秒
- // 有其他格式化字符需求可以继续添加,必须转化成字符串
- }
- for (let k in opt) {
- ret = new RegExp('(' + k + ')').exec(fmt)
- if (ret) {
- fmt = fmt.replace(
- ret[1],
- ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
- )
- }
- }
- return fmt
- },
- handleClose() {
- this.accessoryTFs = false
- },
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`)
- this.pageSize = val
- this.getList()
- },
- handleCurrentChange(val) {
- this.currentPage = val
- console.log(`当前页: ${val}`)
- this.getList()
- },
- //收
- getList(id, id1,id2) {
- if(id2==1){
- complete({
- // compId: sessionStorage.getItem('ws-pf_compId'),
- baseId: id,
- positionId: id1,
- pageSize: this.pageSize,
- currentPage: this.currentPage,
- // inOutDate:this.inOutDate
- })
- .toPromise()
- .then((response) => {
- this.improved = response
- })
- }else if(id2==2){
- completeList({
- baseId: id,
- positionId: id1,
- pageSize: this.pageSize,
- currentPage: this.currentPage,
- })
- .toPromise()
- .then((response) => {
- this.improved = response
- })
- }
- },
- handleExamine(row) {
- this.$router.push({
- name: 'salesContractExamine',
- query: { id: row.id },
- })
- },
- //删除
- handleDelete(row) {
- this.$confirm(`删除后不可恢复,确认删除?`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- })
- .then(() => {
- delInOut({id:row.id})
- .toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '删除成功',
- })
- this.getList(row.baseId,row.positionId,this.$route.query.warehouseType)
- })
- .catch((response) => {
- })
- })
- .catch(() => {
- return false
- })
- }
- },
- find() {
- this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
- this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
- this.currentPage = 1
- this.getList()
- },
- // deletecontract(){},
- //删除
- approve() {},
- listQuery() {},
- total() {},
- clearfiltQuery() {},
- selectCrtDuty() {},
- }
- </script>
- <style lang="scss" scoped>
- .center {
- position: relative;
- top: 50px;
- width: 90%;
- height: 500px;
- margin: 0 auto;
- }
- .container .bg-left {
- margin-left: 40px;
- }
- .container .bg-bottom {
- position: absolute;
- float: right;
- top: 15px;
- right: 20px;
- }
- .vertical-text-left {
- width: 62px;
- text-align: right;
- }
- /deep/.el-form-item {
- width: 33%;
- }
- .el-row {
- background: #f6f7fc;
- // box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
- border-radius: 4px 4px 1px 1px;
- }
- .container .bg-bottom {
- width: 74px;
- height: 32px;
- background: #5473e8;
- border-radius: 4px;
- }
- .bg-bottom {
- margin-top: 5px 0px;
- }
- .el-table .el-table__header tr {
- width: 1091px;
- height: 50px;
- background: #f6f7fc;
- border: 1px solid #e8ecf6;
- text-align: center;
- }
- .el-table .cell {
- text-align: center;
- width: 29px;
- height: 20px;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #5878e8;
- line-height: 20px;
- }
- .default .winseaview-main .el-table th > .cell {
- color: #8890b1;
- }
- .record,
- .adjustment {
- display: inline-block;
- color: #5878e8;
- padding: 0 4px !important;
- position: relative;
- }
- /deep/.el-table td,
- .el-table th {
- text-align: center;
- }
- /deep/.el-table .el-table__header th {
- border-bottom-width: 0px;
- text-align: center;
- }
- .top-grade {
- background: linear-gradient(90deg, #5678e9, #7993f6);
- color: #fff;
- padding: 3px;
- border-radius: 2px;
- }
- .second-class {
- background: linear-gradient(90deg, #50cdd9, #82e2ea);
- color: #fff;
- padding: 3px;
- border-radius: 2px;
- }
- .third-class {
- background: linear-gradient(90deg, #ffa735, #ffbf70);
- color: #fff;
- padding: 3px;
- border-radius: 2px;
- }
- .substandard {
- background: linear-gradient(90deg, #b2b4bb, #ced0d5);
- color: #fff;
- padding: 3px;
- border-radius: 2px;
- }
- // .container .bg-left{
- // width: 663px;
- // height: 28px;
- // font-size: 18px;
- // font-family: PingFangSC-Medium, PingFang SC;
- // font-weight: 500;
- // color: #262626;
- // line-height: 28px;
- // text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
- // }
- .a {
- width: 19px;
- height: 19px;
- background: #afb5cb;
- margin-left: 10px;
- }
- .container .bg-left {
- width: 140px;
- height: 29px;
- font-size: 21px;
- font-family: PingFangSC-Semibold, PingFang SC;
- font-weight: 600;
- color: #323233;
- line-height: 29px;
- }
- .position {
- width: 52px;
- height: 20px;
- background: #afb5cb;
- border-radius: 2px;
- font-size: 12px;
- font-family: PingFangSC-Medium, PingFang SC;
- color: #ffffff;
- line-height: 20px;
- }
- </style>
|