Browse Source

2023--04-13

master
guoxing 2 years ago
parent
commit
c5a9585884
  1. 2
      supervise-customer-ui/.env.development
  2. 2
      supervise-customer-ui/.env.production
  3. 2
      supervise-customer-ui/package.json
  4. 14
      supervise-customer-ui/src/api/supervise/purchaserequisition.js
  5. 14
      supervise-customer-ui/src/api/supervise/purchaserequisitionpro.js
  6. 16
      supervise-customer-ui/src/router/modules/codemenu.js
  7. 9
      supervise-customer-ui/src/views/kucun/xssjgl/index.vue
  8. 422
      supervise-customer-ui/src/views/purchaserequisition/uploadxlsx/index.vue

2
supervise-customer-ui/.env.development

@ -6,4 +6,4 @@ VUE_APP_BASE_API = '/api/service'
## 配置测试和本地开发时的 接口地址
##VUE_APP_URL = "http://8.130.39.13:8112"
VUE_APP_URL = "http://192.168.3.173:8112"
VUE_APP_URL = "http://127.0.0.1:8112"

2
supervise-customer-ui/.env.production

@ -2,7 +2,7 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = '/api'
VUE_APP_BASE_API = '/api/service'
## 配置 正式接口地址
VUE_APP_URL = "http://120.46.131.15:8111"

2
supervise-customer-ui/package.json

@ -17,7 +17,7 @@
"axios": "^0.24.0",
"bpmn-js": "^9.2.2",
"core-js": "^2.6.12",
"echarts": "^5.4.1",
"echarts": "^5.4.2",
"ejs": "^2.7.4",
"element-ui": "2.13.2",
"js-cookie": "2.2.0",

14
supervise-customer-ui/src/api/supervise/purchaserequisition.js

@ -55,5 +55,19 @@ export default {
method: 'post',
data: params
})
},
// 检测供应商信息状态
checkSupplier: function(sid) {
return request({
baseURL:'/api/customer',
url: '/v1/purchaserequisition/checkSupplier/' + sid
})
},
// 检测供应商信息状态
updatePurchaseStateSucess: function(sid) {
return request({
baseURL:'/api/customer',
url: '/v1/purchaserequisition/updatePurchaseStateSucess/' + sid
})
}
}

14
supervise-customer-ui/src/api/supervise/purchaserequisitionpro.js

@ -55,5 +55,19 @@ export default {
method: 'post',
data: params
})
},
// 通过mainsid查询订单内的商品列表
listByMainSid: function(sid) {
return request({
baseURL:'/api/customer',
url: '/v1/purchaserequisitionpro/listByMainSid/' + sid
})
},
// 通过mainsid检查商品状态
checkByMainSid: function(sid) {
return request({
baseURL:'/api/customer',
url: '/v1/purchaserequisitionpro/checkByMainSid/' + sid
})
}
}

16
supervise-customer-ui/src/router/modules/codemenu.js

@ -302,5 +302,21 @@ const codemenu = [{
noCache: true
}
}, ]
}, {
path: '/purchaserequisition',
component: Layout,
redirect: '/purchaserequisition/uploadxlsx',
meta: {
title: '采购订单管理'
},
children: [{
path: '/purchaserequisition/uploadxlsx',
component: () => import('@/views/purchaserequisition/uploadxlsx/index.vue'),
name: 'purchaserequisitionUploadxlsx',
meta: {
title: '上传采购订单',
noCache: true
}
}]
}]
export default codemenu

9
supervise-customer-ui/src/views/kucun/xssjgl/index.vue

@ -81,7 +81,8 @@
<div>共导入数据{{ currentLog.allNum }} 符合监管条件的数据{{ currentLog.validNum }} 用时{{ currentLog.durations }} 毫秒</div>
</el-card>
</div>
<div><el-button :disabled="filecandown" size="small" type="primary" @click="doDownloadHz">下载销售报表文件</el-button></div>
<div><el-button :disabled="filecandown" size="small" type="primary" @click="doDownloadHz">下载销售报表文件</el-button>
<el-button :disabled="filecandown" size="small" type="primary" @click="doDownloadHzYc">下载烟草分销数据文件</el-button></div>
</el-card>
<span slot="footer" class="dialog-footer"><el-button @click="dialogClose"> </el-button></span>
</el-dialog>
@ -250,7 +251,11 @@ export default {
},
doDownloadHz() {
window.open(this.currentLog.fileUrl, '_blank')
this.dialogClose()
// this.dialogClose()
},
doDownloadHzYc() {
window.open(this.currentLog.remarks, '_blank')
// this.dialogClose()
},
downExcel(row) {
if (row.fileUrl) {

422
supervise-customer-ui/src/views/purchaserequisition/uploadxlsx/index.vue

@ -6,6 +6,23 @@
<div>{{ viewTitle }}</div>
<!-- start 添加修改按钮 -->
<div style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center">
<el-button type="text" @click="handleDownload"><span style="border-bottom: 1px solid blue">下载Excel示例表样</span></el-button>
<div style="margin-left: 10px;margin-right: 10px">
<el-upload
ref="upload"
class="upload-demo"
accept=".xls"
:action="updateAction"
:file-list="fileList"
:on-progress="handleProgress"
:on-success="handleSuccess"
:multiple="false"
:show-file-list="false"
:limit="1"
>
<el-button type="primary" size="small">上传采购订单excel文件</el-button>
</el-upload>
</div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!-- end 添加修改按钮 -->
@ -13,123 +30,88 @@
</div>
<!-- 标题按钮部分结束 -->
<!-- Start 新增修改部分 -->
<div class="listconadd" style="padding: 10px;">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>采购订单excel文件上传</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="handleDownload">下载Excel示例表样</el-button>
</div>
<el-row>
<el-col :span="8">
<div>
<el-upload
ref="upload"
class="upload-demo"
accept=".xls"
:action="updateAction"
:before-upload="handleBeforeUpload"
:on-progress="handleProgress"
:on-success="handleSuccess"
:file-list="fileList"
:auto-upload="false"
:multiple="false"
:limit="1"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
</el-upload>
</div>
</el-col>
<el-col :span="16">
<div>上传采购订单的Excel文件文件名以订单号开头类似90002303240037石家庄朋硕家居用品有限公司.xls</div>
</el-col>
</el-row>
</el-card>
<div class="listconadd" style="padding: 20px;">
<el-collapse v-model="collOrderInfoActiveNames">
<el-collapse-item title="订单详情" name="1">
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="right" class="formadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="right" class="formadd" style="padding: 0px;">
<div class="title">
<div>采购订单信息</div>
</div>
<el-row>
<el-col :span="4" class="tleftb"><span>订单编号</span></el-col>
<el-col :span="8" class="trightb">
<el-col :span="3" class="tleftb"><span>订单编号</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.code }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>填单人</span></el-col>
<el-col :span="8" class="trightb">
<el-col :span="3" class="tleftb"><span>填单人</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.buyerName }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb"><span>填单时间</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.purchaseDate }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"><span>供货单位</span></el-col>
<el-col :span="8" class="trightb">
<el-col :span="3" class="tleftb"><span>供货单位</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.supplierName }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>仓位</span></el-col>
<el-col :span="8" class="trightb">
<el-col :span="3" class="tleftb"><span>仓位</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.warehousePosition }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb"><span>到货日期</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.arrivalDate }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"><span>采购员</span></el-col>
<el-col :span="8" class="trightb">
<el-col :span="3" class="tleftb"><span>采购员</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.buyerName }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>入库单位</span></el-col>
<el-col :span="8" class="trightb">
<el-col :span="3" class="tleftb"><span>入库单位</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.purchasingDeptName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"><span>要货单位</span></el-col>
<el-col :span="8" class="trightb">
<el-col :span="3" class="tleftb"><span>单据到效期</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.purchasingDeptName }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>入库仓位</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.warehousePosition }}</span>
<span>{{ formobj.expiryDate }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"><span>填单日期</span></el-col>
<el-col :span="8" class="trightb">
<el-col :span="3" class="tleftb"><span>要货单位</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.purchaseDate }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>到货日期</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.arrivalDate }}</span>
<span>{{ formobj.purchasingDeptName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"><span>单据到效期</span></el-col>
<el-col :span="8" class="trightb">
<el-col :span="3" class="tleftb"><span>入库仓位</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.expiryDate }}</span>
<span>{{ formobj.warehousePosition }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>完成状态</span></el-col>
<el-col :span="8" class="trightb">
<el-col :span="3" class="tleftb"><span>完成状态</span></el-col>
<el-col :span="5" class="trightb">
<el-form-item>
<span>{{ formobj.completionStatus }}</span>
</el-form-item>
@ -142,108 +124,17 @@
<span>合计金额:{{ amountInTotal }}</span>
</div>
</div>
<el-table :key="tableKey" :data="formobj.pros" :index="index" border style="width: 100%">
<el-table-column fixed label="序号" width="80px" type="index" :index="index + 1" align="center" />
<el-table-column fixed label="操作" width="100px" align="center" header-align="center">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="商品代码" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.proCode }}</span>
</template>
</el-table-column>
<el-table-column label="商品名称" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.proName }}</span>
</template>
</el-table-column>
<el-table-column label="规格型号" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.content }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.number }}</span>
</template>
</el-table-column>
<el-table-column label="包装数量" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.packageNumber }}</span>
</template>
</el-table-column>
<el-table-column label="包内数量" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.packageInsideNumber }}</span>
</template>
</el-table-column>
<el-table-column label="包装规格" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.packageSpec }}</span>
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.unit }}</span>
</template>
</el-table-column>
<el-table-column label="包装价格(元)" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.packagePrice }}</span>
</template>
</el-table-column>
<el-table-column label="包合计(元)" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.packageTotalPrice }}</span>
</template>
</el-table-column>
<el-table-column label="单价(元)" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.unitPrice }}</span>
</template>
</el-table-column>
<el-table-column label="含税单价(元)" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.unitPriceTax }}</span>
</template>
</el-table-column>
<el-table-column label="合计(元)" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.totalPrice }}</span>
</template>
</el-table-column>
<el-table-column label="商品品类名称" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.category }}</span>
</template>
</el-table-column>
<el-table-column label="商品品类编码" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.categoryKey }}</span>
</template>
</el-table-column>
<el-table-column label="品牌名称" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.brand }}</span>
</template>
</el-table-column>
<el-table-column label="品牌编码" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.brandCode }}</span>
</template>
</el-table-column>
<el-table-column label="发货日期" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.issuanceDate }}</span>
</template>
</el-table-column>
<el-table-column label="零售金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.retailAmount }}</span>
</template>
</el-table-column>
<el-table :data="prolist" :index="index" border style="width: 100%">
<el-table-column fixed label="序号" width="60px" type="index" :index="index + 1" align="center" />
<el-table-column label="商品代码" align="center" width="100" prop="proCode" />
<el-table-column label="商品名称" align="center" prop="proName" />
<el-table-column label="品类编码" align="center" width="100" prop="categoryKey" />
<el-table-column label="品类名称" align="center" width="100" prop="category" />
<el-table-column label="品牌编码" align="center" width="100" prop="brandCode" />
<el-table-column label="品牌名称" align="center" width="100" prop="brand" />
<el-table-column label="合计(元)" align="center" width="150" prop="totalPrice" />
<el-table-column label="数量" align="center" width="100" prop="number" />
<el-table-column label="包装规格" align="center" width="150" prop="packageSpec" />
</el-table>
</el-form>
</el-collapse-item>
@ -255,16 +146,41 @@
<el-button style="float: right; padding: 3px 0" type="text" @click="handleDownload">重新检测</el-button>
</div>
<div>
供应商信息检测
<div v-if="supplierCheckState==0">{{ supplierCheckMsg }}</div>
<div v-else-if="supplierCheckState==1">
<el-table :data="supplierChecklist" :index="index" border style="width: 100%">
<el-table-column fixed label="序号" width="60px" type="index" :index="index + 1" align="center" />
<el-table-column label="供应商编码" align="center" width="150" prop="supplierCode" />
<el-table-column label="供应商名称" align="center" prop="supplierName" />
<el-table-column label="供应商统一编码" align="center" width="150" prop="supplierCodeUnified" />
<el-table-column label="状态" align="center" width="150" prop="resState" />
<el-table-column label="检测结果" align="center" width="300" prop="msg" />
</el-table>
</div>
<div v-else> <el-alert title="供应商信息正常!" show-icon type="success" effect="dark" :closable="false" /></div>
</div>
</el-card>
<el-card class="box-card">
<el-card class="box-card" style="margin-top: 5px;">
<div slot="header" class="clearfix">
<span>商品信息检测</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="handleDownload">重新检测</el-button>
</div>
<div>
商品信息检测
<div v-if="proCheckState==0">{{ proCheckMsg }}</div>
<div v-else-if="proCheckState==1">
<el-table :data="proChecklist" :index="index" border style="width: 100%">
<el-table-column fixed label="序号" width="60px" type="index" :index="index + 1" align="center" />
<el-table-column label="商品代码" align="center" width="100" prop="productCode" />
<el-table-column label="商品名称" align="center" prop="productName" />
<el-table-column label="品类编码" align="center" width="100" prop="categoryCode" />
<el-table-column label="品类名称" align="center" width="100" prop="categoryName" />
<el-table-column label="品牌编码" align="center" width="100" prop="brandCode" />
<el-table-column label="品牌名称" align="center" width="100" prop="brandName" />
<el-table-column label="状态" align="center" width="150" prop="resState" />
<el-table-column label="检测结果" align="center" width="300" prop="msg" />
</el-table>
</div>
<div v-else> <el-alert title="所有商品信息正常!" show-icon type="success" effect="dark" :closable="false" /></div>
</div>
</el-card>
</div>
@ -274,6 +190,7 @@
<script>
import req from '@/api/supervise/purchaserequisition'
import reqPro from '@/api/supervise/purchaserequisitionpro'
export default {
name: 'PurchaserequisitionUploadxlsx',
data() {
@ -312,6 +229,13 @@
completionStatusKey: '', // key
pros: [] //
},
prolist: [],
supplierCheckState: 0,
supplierCheckMsg: '等待检测',
supplierChecklist: [],
proCheckState: 0,
proCheckMsg: '等待检测',
proChecklist: [],
rules: {}
}
},
@ -349,16 +273,6 @@
this.$router.go(-1)
// this.$emit('doback')
},
handleBeforeUpload(file) {
console.log('handleBeforeUpload', file)
req.checkCodeByFileName(file.name).then(res => {
console.log('eeee', res)
return false
})
},
submitUpload() {
this.$refs.upload.submit()
},
handleProgress(event, file, fileList) {
// this.progressFlag = true; //
// this.loadProgress = parseInt(event.percent); //
@ -378,38 +292,38 @@
// _this.fullscreenloading.text = ''
// }
},
handleSuccess(resp, file, fileList) {
// if (this.fullscreenloading) this.fullscreenloading.close()
// this.fullscreenloading = null
console.log('222', resp)
// const rdata = resp.data
// const _this = this
// _this.fullscreenloading.text = ''
// _this.uploadResultMesssage = '' + rdata.allNum + ' ' + rdata.validNum + ' ' + rdata.durations + ' '
// handleSuccess(resp, file, fileList) {
// // if (this.fullscreenloading) this.fullscreenloading.close()
// // this.fullscreenloading = null
// console.log('222', resp)
// // const rdata = resp.data
// // const _this = this
// // _this.fullscreenloading.text = ''
// // _this.uploadResultMesssage = '' + rdata.allNum + ' ' + rdata.validNum + ' ' + rdata.durations + ' '
// kchz()
// .then(res => {
// if (this.fullscreenloading) this.fullscreenloading.close()
// this.fullscreenloading = null
// console.log('333', res)
// _this.hzFilePath = res.data
// })
// .catch(e => {
// if (this.fullscreenloading) this.fullscreenloading.close()
// this.fullscreenloading = null
// })
// // kchzyc()
// // .then(res => {
// // if (this.fullscreenloading) this.fullscreenloading.close()
// // this.fullscreenloading = null
// // console.log('444', res)
// // _this.ychzFilePath = res.data
// // })
// // .catch(e => {
// // if (this.fullscreenloading) this.fullscreenloading.close()
// // this.fullscreenloading = null
// // })
},
// // kchz()
// // .then(res => {
// // if (this.fullscreenloading) this.fullscreenloading.close()
// // this.fullscreenloading = null
// // console.log('333', res)
// // _this.hzFilePath = res.data
// // })
// // .catch(e => {
// // if (this.fullscreenloading) this.fullscreenloading.close()
// // this.fullscreenloading = null
// // })
// // // kchzyc()
// // // .then(res => {
// // // if (this.fullscreenloading) this.fullscreenloading.close()
// // // this.fullscreenloading = null
// // // console.log('444', res)
// // // _this.ychzFilePath = res.data
// // // })
// // // .catch(e => {
// // // if (this.fullscreenloading) this.fullscreenloading.close()
// // // this.fullscreenloading = null
// // // })
// },
showAdd() {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
@ -451,6 +365,7 @@
window.location.href = process.env.VUE_APP_BASE_API + '/v1/purchaserequisition/yb'
},
handleSuccess(resp, file, fileList) {
this.fileList = []
if (resp.success) {
this.$message({
showClose: true,
@ -458,21 +373,9 @@
message: '导入成功'
})
this.formobj = resp.data
if (this.formobj.pros.length > 0) {
this.totalQuantity = this.formobj.pros.length
var aa = 0
for (var i = 0; i < this.formobj.pros.length; i++) {
if (this.formobj.pros[i].totalPrice !== '') {
aa = parseFloat(aa) + parseFloat(this.formobj.pros[i].totalPrice)
}
}
this.amountInTotal = aa
}
console.log(',,1111', this.formobj.code)
if (this.formobj.code) {
this.candownload = false
}
this.loadProList()
this.checkPro()
this.checkSupplier()
} else {
this.$message({
showClose: true,
@ -481,6 +384,59 @@
})
}
},
loadProList() {
if (this.formobj.sid) {
reqPro.listByMainSid(this.formobj.sid).then(resp => {
this.prolist = resp.data
this.totalQuantity = this.prolist.length
var aa = 0
for (var i = 0; i < this.prolist.length; i++) {
if (this.prolist[i].totalPrice !== '') {
aa = parseFloat(aa) + parseFloat(this.prolist[i].totalPrice)
}
}
this.amountInTotal = aa
})
}
},
checkPro() {
if (this.formobj.sid) {
this.proCheckMsg = '正在对订单的商品信息进行检测...'
reqPro.checkByMainSid(this.formobj.sid).then(resp => {
this.proChecklist = resp.data
if (this.proChecklist.length > 0) {
this.proCheckState = 1
} else {
this.proCheckState = 2
if (this.formobj.purchaseState === '0' && this.supplierCheckState === 2) {
this.updatePurchaseStateSucess()
}
}
this.loadProList()
})
}
},
checkSupplier() {
if (this.formobj.sid) {
this.supplierCheckMsg = '正在检测供应商信息...'
req.checkSupplier(this.formobj.sid).then(resp => {
this.supplierChecklist = resp.data
if (this.supplierChecklist.length > 0) {
this.supplierCheckState = 1
} else {
this.supplierCheckState = 2
if (this.formobj.purchaseState === '0' && this.proCheckState === 2) {
this.updatePurchaseStateSucess()
}
}
})
}
},
updatePurchaseStateSucess() {
req.updatePurchaseStateSucess(this.formobj.sid).then(resp => {
this.formobj.purchaseState = '1'
})
},
dataDelete(index) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {

Loading…
Cancel
Save