From 0f301b96ead32a35b93a3b2b80af9bd67f340c01 Mon Sep 17 00:00:00 2001
From: guoxing <1369478551@qq.com>
Date: Wed, 28 Aug 2024 11:50:22 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=B0=83=E6=8B=A8=E7=AE=A1?=
=?UTF-8?q?=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yxt-as-ui/src/api/Common/dictcommons.js | 10 +
yxt-as-ui/src/api/storage/allocation.js | 7 +
yxt-as-ui/src/api/storage/oldPartsRecovery.js | 29 +-
yxt-as-ui/src/router/index.js | 5 +-
.../storage/allocation/allocationAdd.vue | 316 +++----
.../storage/allocation/allocationInfo.vue | 12 +-
.../src/views/storage/allocation/index.vue | 4 +-
.../allocation/relation/chooseproducts.vue | 170 ++++
.../oldPartsFactory/oldPartsFactoryAdd.vue | 2 +-
.../storage/oldPartsInAndOutStorage/index.vue | 138 +--
.../views/storage/oldPartsRecovery/index.vue | 191 +++--
.../oldPartsRecovery/oldPartsRecoveryAdd.vue | 230 ++---
.../oldPartsRecovery/repairbillInfo.vue | 796 ++++++++++--------
13 files changed, 1112 insertions(+), 798 deletions(-)
create mode 100644 yxt-as-ui/src/views/storage/allocation/relation/chooseproducts.vue
diff --git a/yxt-as-ui/src/api/Common/dictcommons.js b/yxt-as-ui/src/api/Common/dictcommons.js
index d23f26f1ee..8f5fefbc63 100644
--- a/yxt-as-ui/src/api/Common/dictcommons.js
+++ b/yxt-as-ui/src/api/Common/dictcommons.js
@@ -60,6 +60,16 @@ export function getListDeptByOrgSid(data) {
})
}
+
+// 根据分公司Sid获取分公司下所有的服务站
+export function getServiceStationByOrgSid(data) {
+ return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
+ url: '/portal/v1/sysorganization/getServiceStationByOrgSid/' + data,
+ method: 'GET'
+ })
+}
+
// 获取所有岗位
export function postName(data) {
return request({
diff --git a/yxt-as-ui/src/api/storage/allocation.js b/yxt-as-ui/src/api/storage/allocation.js
index 651de970b6..1c28f2ff1a 100644
--- a/yxt-as-ui/src/api/storage/allocation.js
+++ b/yxt-as-ui/src/api/storage/allocation.js
@@ -5,6 +5,7 @@ export default {
// 查询分页列表
listPage: function(params) {
return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/listPage',
method: 'post',
data: params,
@@ -16,6 +17,7 @@ export default {
deleteBySids: function(data) {
return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/delBySids',
method: 'DELETE',
data: data,
@@ -28,6 +30,7 @@ export default {
// 保存物流信息
saveLogisticsInfo: function(data) {
return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/saveLogisticsInfo',
method: 'post',
data: data,
@@ -39,6 +42,7 @@ export default {
// 新增、保存
save: function(data) {
return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/save',
method: 'post',
data: data,
@@ -51,6 +55,7 @@ export default {
// 初始化
init: function(data) {
return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/fetchDetailsBySid/' + data,
method: 'get'
});
@@ -59,6 +64,7 @@ export default {
// 调拨
allocation: function(data) {
return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/allocation',
method: 'post',
data: data,
@@ -72,6 +78,7 @@ export default {
// 查询所有商品
getGoods: function(params) {
return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventory/alloGoodsListPage',
method: 'post',
data: params,
diff --git a/yxt-as-ui/src/api/storage/oldPartsRecovery.js b/yxt-as-ui/src/api/storage/oldPartsRecovery.js
index 0a95ff29da..318e158d60 100644
--- a/yxt-as-ui/src/api/storage/oldPartsRecovery.js
+++ b/yxt-as-ui/src/api/storage/oldPartsRecovery.js
@@ -5,6 +5,7 @@ export default {
// 查询分页列表
listPage: function(params) {
return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/as/v1/AsBusrepairBill/pageBillList',
method: 'post',
data: params,
@@ -17,15 +18,16 @@ export default {
// 获取维修工单详情
getOneByBillNo: function(data) {
return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/as/v1/AsBusrepairBill/getOneByBillNo?sid=' + data,
method: 'get',
});
},
-
// 保存旧件回收登记
- save: function(data) {
+ saveorUpdateOldRegister: function(data) {
return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/WmsOldRegister/saveorUpdateOldRegister',
method: 'post',
data: data,
@@ -35,4 +37,27 @@ export default {
});
},
+ // 获取旧件入库详情
+ init: function(data) {
+ return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
+ url: '/wms/apiadmin/WmsOldInventory/getInit?sid=' + data,
+ method: 'get',
+ });
+ },
+
+ // 保存旧件入库
+ saveInventory: function(data) {
+ return request({
+ baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
+ url: '/wms/apiadmin/WmsOldInventory/saveInventory',
+ method: 'post',
+ data: data,
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ });
+ },
+
+
}
diff --git a/yxt-as-ui/src/router/index.js b/yxt-as-ui/src/router/index.js
index e0ad5dc954..39bb3d8fff 100644
--- a/yxt-as-ui/src/router/index.js
+++ b/yxt-as-ui/src/router/index.js
@@ -536,7 +536,7 @@ export const constantRoutes = [{
component: () => import('@/views/storage/oldPartsRecovery/index'),
name: 'OldPartsRecovery',
meta: {
- title: '旧件回收',
+ title: '旧件入库',
noCache: true
}
},
@@ -875,7 +875,8 @@ export const constantRoutes = [{
},
{
path: '/sparePartsCommissionFiling/sparePartsCommissionFiling',
- component: () => import('@/views/basicinformation/sparePartsCommissionFiling/sparePartsCommissionFiling.vue'),
+ component: () => import(
+ '@/views/basicinformation/sparePartsCommissionFiling/sparePartsCommissionFiling.vue'),
name: 'SparePartsCommissionFiling',
meta: {
title: '配件销售提成备案管理',
diff --git a/yxt-as-ui/src/views/storage/allocation/allocationAdd.vue b/yxt-as-ui/src/views/storage/allocation/allocationAdd.vue
index 0db8cd3ba4..10847cae95 100644
--- a/yxt-as-ui/src/views/storage/allocation/allocationAdd.vue
+++ b/yxt-as-ui/src/views/storage/allocation/allocationAdd.vue
@@ -5,7 +5,7 @@
{{ viewTitle }}
保存
- 调拨
+ 提交
关闭
@@ -43,9 +43,7 @@
申请日期
-
-
+ {{ formobj.createTime }}
@@ -59,7 +57,7 @@
调入站
+ class="addinputInfo addinputw">
@@ -95,12 +93,13 @@
-
+
-
+
+
+
+ 删除
+
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
diff --git a/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryAdd.vue b/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryAdd.vue
index 9c17d3d5bf..bb180d45f3 100644
--- a/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryAdd.vue
+++ b/yxt-as-ui/src/views/storage/oldPartsFactory/oldPartsFactoryAdd.vue
@@ -65,7 +65,7 @@
* 附件
-
+
diff --git a/yxt-as-ui/src/views/storage/oldPartsInAndOutStorage/index.vue b/yxt-as-ui/src/views/storage/oldPartsInAndOutStorage/index.vue
index 4ddf2a1d88..f8e8f792c0 100644
--- a/yxt-as-ui/src/views/storage/oldPartsInAndOutStorage/index.vue
+++ b/yxt-as-ui/src/views/storage/oldPartsInAndOutStorage/index.vue
@@ -50,14 +50,16 @@
-
+
-
+
@@ -88,10 +90,10 @@
@selection-change="selectionLineChangeHandle">
+
-
@@ -130,6 +132,10 @@
import pageye from '@/components/pagination/pageye'
// import divAdd from './oldPartsInStorageAdd.vue'
// import divInfo from './oldPartsInvertoryInfo.vue'
+ import {
+ typeValues
+ } from '@/api/Common/dictcommons'
+ import req2 from '@/api/goods/factory.js'
export default {
components: {
ButtonBar,
@@ -184,15 +190,7 @@
sid: "2"
}
],
- billStateList: [{
- name: "业务类型1",
- sid: "0"
- },
- {
- name: "业务类型2",
- sid: "1"
- }
- ],
+ billStateList: [],
}
},
mounted() {
@@ -200,11 +198,51 @@
},
created() {
this.loadList()
- this.getWarehouseList()
- this.getManufacturerList()
+ this.init()
},
methods: {
+ init() {
+ var parpams1 = {
+ orgPath: window.sessionStorage.getItem('defaultOrgPath'),
+ }
+ req.getWarehouses(parpams1).then((res) => {
+ if (res.success) {
+ this.warehouseList = res.data
+
+ console.log("aaaaaa", this.warehouseList);
+
+ }
+ })
+
+ typeValues({
+ type: 'wms_busType'
+ }).then((res) => {
+ if (res.success) {
+ this.busTypeList = res.data
+ }
+ })
+
+ typeValues({
+ type: 'billsType'
+ }).then((res) => {
+ if (res.success) {
+ this.billStateList = res.data
+ }
+ })
+
+ var parpams2 = {
+ useOrgSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
+ .getItem('defaultOrgPath').lastIndexOf('/') + 1)
+ }
+ req2.getAllFacturer(parpams2).then(resp => {
+ this.manufacturerList = resp.data
+ })
+ console.log("aaaaaa", this.manufacturerList);
+
+ },
+
+
selectionLineChangeHandle(val) {
console.log("val", val);
@@ -324,31 +362,31 @@
toBuild() {
// if (this.sids.length > 0) {
- const loading = this.$loading({
- lock: true,
- text: 'Loading',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
+ const loading = this.$loading({
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
- req.exportExcel(this.queryParams.params).then((resp) => {
- loading.close()
- const blob = new Blob([resp], {
- type: 'application/vnd.ms-excel'
- })
- const fileName = '旧件出入库记录' + '.xls'
- const elink = document.createElement('a')
- elink.download = fileName
- elink.style.display = 'nonde'
- elink.href = URL.createObjectURL(blob)
- document.body.appendChild(elink)
- elink.click()
- URL.revokeObjectURL(elink.href)
- document.body.removeChild(elink)
- }).catch(() => {
- loading.close()
+ req.exportExcel(this.queryParams.params).then((resp) => {
+ loading.close()
+ const blob = new Blob([resp], {
+ type: 'application/vnd.ms-excel'
})
+ const fileName = '旧件出入库记录' + '.xls'
+ const elink = document.createElement('a')
+ elink.download = fileName
+ elink.style.display = 'nonde'
+ elink.href = URL.createObjectURL(blob)
+ document.body.appendChild(elink)
+ elink.click()
+ URL.revokeObjectURL(elink.href)
+ document.body.removeChild(elink)
+ }).catch(() => {
+ loading.close()
+ })
// } else {
// this.$message({
// type: "warning",
@@ -379,34 +417,6 @@
this.queryParams.params.manufacturerSid = choose[0].sid
},
- getManufacturerList() {
- var params = {
- userSid : window.sessionStorage.getItem('userSid'),
- orgPath :window.sessionStorage.getItem('defaultOrgPath'),
- menuUrl : this.$route.path
- }
- req.choiceManufacturer(params).then((res) => {
- if (res.success) {
- this.manufacturerList = res.data
-
- console.log("aaaaaa", this.manufacturerList);
-
- }
- })
- },
- getWarehouseList() {
- var parpams = {
- orgPath: window.sessionStorage.getItem('defaultOrgPath'),
- }
- req.getWarehouses(parpams).then((res) => {
- if (res.success) {
- this.warehouseList = res.data
-
- console.log("aaaaaa", this.warehouseList);
-
- }
- })
- },
getWarehouseAreaList(sid) {
var query = {
ckSid: sid
diff --git a/yxt-as-ui/src/views/storage/oldPartsRecovery/index.vue b/yxt-as-ui/src/views/storage/oldPartsRecovery/index.vue
index ddf5f1d5cf..f76896bb6a 100644
--- a/yxt-as-ui/src/views/storage/oldPartsRecovery/index.vue
+++ b/yxt-as-ui/src/views/storage/oldPartsRecovery/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -9,10 +9,10 @@
查询
@@ -32,7 +38,7 @@
@@ -48,14 +54,15 @@
查看
-->
-
+
{{ scope.row.billNo }}
-
+
+
@@ -91,7 +98,7 @@
-
+
@@ -100,8 +107,8 @@
-
+
@@ -110,12 +117,12 @@
-
+
- 维修工单编号
+ 维修单号
{{ orderInfo.billNo }}
@@ -123,8 +130,8 @@
- 旧件回收说明
-
+ * 旧件回收说明
+
@@ -135,10 +142,10 @@
- 旧件照片
-
-
+ * 旧件照片
+
+
@@ -192,6 +199,13 @@
btnKey: 'toAdd',
btnLabel: '回收登记'
},
+ {
+ type: 'primary',
+ size: 'small',
+ icon: 'plus',
+ btnKey: 'toUp',
+ btnLabel: '上架'
+ },
{
type: 'info',
size: 'small',
@@ -205,13 +219,33 @@
size: 10,
total: 0,
params: {
- name: ''
+ "billNo": "",
+ "createTimeStart": "",
+ "createTimeEnd": "",
+ "vehMark": "",
+ "customerName": "",
+ "vinNo": "",
+ "userSid": "",
+ "orgPath": "",
+ "menuUrl": ""
}
},
sids: [],
selectionList: [],
imgList: [],
- accept: '.jpg,.jpeg,.png,.pdf,.JPG,.JPEG'
+ accept: '.jpg,.jpeg,.png,.pdf,.JPG,.JPEG',
+ rules: {
+ shortss: [{
+ required: true,
+ message: '回收说明不能为空',
+ trigger: 'change'
+ }],
+ photos: [{
+ required: true,
+ message: '旧件不能为空',
+ trigger: 'blur'
+ }],
+ }
}
},
mounted() {
@@ -224,7 +258,8 @@
backData(value) {
console.log('backData》》》》', value)
console.log('imgList', this.imgList)
-
+ this.imgList = value
+ this.orderInfo.photos = []
for (var i = 0; i < this.imgList.length; i++) {
this.orderInfo.photos.push(this.imgList[i].url)
}
@@ -259,6 +294,9 @@
case 'toAdd':
this.toAdd()
break
+ case 'toUp':
+ this.toUp()
+ break
case 'doClose':
this.doClose()
break
@@ -303,7 +341,15 @@
size: 10,
total: 0,
params: {
- name: ''
+ "billNo": "",
+ "createTimeStart": "",
+ "createTimeEnd": "",
+ "vehMark": "",
+ "customerName": "",
+ "vinNo": "",
+ "userSid": "",
+ "orgPath": "",
+ "menuUrl": ""
}
}
this.loadList()
@@ -319,25 +365,49 @@
})
return
}
+ this.imgList = []
+ this.orderInfo = JSON.parse(JSON.stringify(this.selectionList[0]));
+ for (var i = 0; i < this.selectionList[0].photos.length; i++) {
+ this.imgList.push({
+ url: this.selectionList[0].photos[i]
+ })
+ }
- req.getOneByBillNo(this.selectionList[0].sid).then((resp) => {
+ this.$nextTick(() => {
+ this.$refs['form_obj'].clearValidate()
+ })
+ this.dialogVisible2 = true
- this.orderInfo = resp.data
+ // req.getOneByBillNo(this.selectionList[0].sid).then((resp) => {
+ // this.orderInfo = resp.data
- for (var i = 0; i < resp.data.photos.length; i++) {
- this.imgList.push({
- url: resp.data.photos[i].url
- })
- }
- this.dialogVisible2 = true
+ // for (var i = 0; i < resp.data.photos.length; i++) {
+ // this.imgList.push({
+ // url: resp.data.photos[i].url
+ // })
+ // }
- }).catch(() => {})
+ // this.dialogVisible2 = true
+
+ // }).catch(() => {})
},
+ toUp() {
+ if (this.selectionList.length != 1) {
+ this.$message({
+ showClose: true,
+ type: 'warning',
+ message: '请选择一条记录操作.'
+ })
+ return
+ }
+ this.viewState = 2
+ this.$refs['divadd'].showEdit(this.selectionList[0])
+ },
showImage(paths) {
this.fileList = paths
this.dialogVisible = true
@@ -350,31 +420,35 @@
console.log('saveExamine》》》》', this.orderInfo)
- if (this.orderInfo.shortss == '') {
- this.$message({
- showClose: true,
- type: 'warning',
- message: '旧件回收说明不能为空'
- })
- return
- }
-
- if (this.orderInfo.photos.length == 0) {
- this.$message({
- showClose: true,
- type: 'warning',
- message: '旧件照片不能为空'
- })
- return
- }
-
+ // if (this.orderInfo.shortss == '') {
+ // this.$message({
+ // showClose: true,
+ // type: 'warning',
+ // message: '旧件回收说明不能为空'
+ // })
+ // return
+ // }
+
+ // if (this.orderInfo.photos.length == 0) {
+ // this.$message({
+ // showClose: true,
+ // type: 'warning',
+ // message: '旧件照片不能为空'
+ // })
+ // return
+ // }
+
+ this.$refs['form_obj'].validate((valid) => {
+ if (valid) {
+ req.saveorUpdateOldRegister(this.orderInfo).then((resp) => {
+ this.orderInfo = {}
+ this.imgList = []
+ this.loadList()
+ this.dialogVisible2 = false
+ }).catch(() => {})
- req.save(this.orderInfo).then((resp) => {
- this.orderInfo={}
- this.imgList = []
- this.loadList()
- this.dialogVisible2 = false
- }).catch(() => {})
+ }
+ })
},
handleClose2() {
@@ -401,6 +475,13 @@
}