diff --git a/packageElectron/components/autograph.vue b/packageElectron/components/autograph.vue
new file mode 100644
index 0000000..02409e3
--- /dev/null
+++ b/packageElectron/components/autograph.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packageElectron/index.vue b/packageElectron/index.vue
new file mode 100644
index 0000000..ff853b0
--- /dev/null
+++ b/packageElectron/index.vue
@@ -0,0 +1,293 @@
+
+
+
+ 返回
+ 商品列表
+
+
+
+ {{item.text}}({{item.count}})
+
+
+
+
+
+
+
+ {{item.productName}}
+ 规格:默认
+ 库存:{{item.totalStock}}
+
+
+
+
+
+
+
+ 暂无对账单~
+
+
+
+
+
+
+
+
diff --git a/packageElectron/reconciliationDetails/index.vue b/packageElectron/reconciliationDetails/index.vue
new file mode 100644
index 0000000..02409e3
--- /dev/null
+++ b/packageElectron/reconciliationDetails/index.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packageIntegral/productAddition/index.vue b/packageIntegral/productAddition/index.vue
index bab6ca5..54e42f7 100644
--- a/packageIntegral/productAddition/index.vue
+++ b/packageIntegral/productAddition/index.vue
@@ -4,95 +4,100 @@
返回
新增商品
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
取消
- 下一步
+ 下一步
-
-
-
-
-
-
-
+
+
+
+
+
+
+
商品类型:
-
- {{item.attributeName}}:
-
-
-
-
-
-
-
+
+ {{item.attributeName}}:
+
+
+
+
+
+
+
-
+
批量填充:批量填充填入信息后,可以批量将内容填写到SKU 信息里
- {{item.label}}
- 确定
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
*
规格:
- {{radioAttributes}}
- {{radioAttributes}}+{{checkboxAttributes[index]}}
+ {{radioAttributes}}
+ {{radioAttributes}}+{{checkboxAttributes[index]}}
@@ -106,44 +111,45 @@
- 删除
+ 删除
*
商品图片:
最多可上传10张图片
+
+
+
+
+ 商品主图
+
-
-
-
- 商品主图
-
-
-
-
- 设为主图
-
-
+
+
+ 设为主图
+
-
-
-
-
+
+
+
+
-
+
+
-
-
- 上一步
- 完成
+
+
+ 上一步
+ 完成
+
-
-
+
@@ -155,44 +161,64 @@
import serve from '@/api/packageIntegral/productList.js'
import mulpicker from '@/packageIntegral/components/mulpicker.vue'
export default {
- components: {
- mulpicker
- },
+ components: {
+ mulpicker
+ },
data() {
return {
currentBoxId: 'chooseType', //当前显示的view的id
isBoxShow: false,
- productDate:{
- productStatus:'1',
- images:[]
+ productDate: {
+ productStatus: '1',
+ images: []
},
- productList:[],
- brandIdList:[],
- radioItem:[{
- name: '新品',
- checked: true
- }, {
- name: '推荐',
- checked: false
- }],
- rules:{
- demandRegion:{rules:[{required: true,errorMessage: '请选择商品分类'}]},
- productName:{rules:[{required: true,errorMessage: '请输入商品名称'}]},
- brandId:{rules:[{required: true,errorMessage: '请选择商品品牌'}]},
- price:{rules:[{required: true,errorMessage: '请输入商品售价'}]},
- },
- attributesTypeList:[],
- attributesList:[],
- bottonList:[
- {label:'市场价格',value:'marketPrice',checked:false},
- {label:'销售价格',value:'sellPrice',checked:false},
- {label:'商品库存',value:'stock',checked:false},
- {label:'兑换积分',value:'integral',checked:false}
- ],
- radioAttributes:'',
- checkboxAttributes:[],
- stockList:[],
- checkedList:[]
+ productList: [],
+ brandIdList: [],
+ radioItem: [{
+ name: '新品',
+ checked: true
+ }, {
+ name: '推荐',
+ checked: false
+ }],
+ rules: {
+ demandRegion: {
+ rules: [{
+ required: true,
+ errorMessage: '请选择商品分类'
+ }]
+ },
+ productName: {
+ rules: [{
+ required: true,
+ errorMessage: '请输入商品名称'
+ }]
+ },
+ brandId: {
+ rules: [{
+ required: true,
+ errorMessage: '请选择商品品牌'
+ }]
+ },
+ price: {
+ rules: [{
+ required: true,
+ errorMessage: '请输入商品售价'
+ }]
+ },
+ },
+ attributesTypeList: [],
+ attributesList: [],
+ bottonList: [{
+ marketPrice: '',
+ sellPrice: '',
+ stock: '',
+ integral: ''
+ }],
+ radioAttributes: '',
+ checkboxAttributes: [],
+ stockList: [],
+ checkedList: []
}
},
@@ -201,515 +227,579 @@
this.getProductBrands()
this.getAttributesType()
},
- watch:{
- 'productDate.demandRegion'(val){
- if(val){
+ watch: {
+ 'productDate.demandRegion'(val) {
+ if (val) {
this.productDate.categoryOneId = val.split(',')[0]
this.productDate.categoryTwoId = val.split(',')[1]
}
},
- 'productDate.attributesTypeId'(val){
- if(!val){
+ 'productDate.attributesTypeId'(val) {
+ if (!val) {
this.stockList = []
}
}
},
methods: {
- switchChange(e){
- if(e.detail.value == true){
+ switchChange(e) {
+ if (e.detail.value == true) {
this.productDate.productStatus = '1'
- }else if(e.detail.value == false){
+ } else if (e.detail.value == false) {
this.productDate.productStatus = '2'
}
},
- classfication(){
- serve.classification().then(res=>{
+ classfication() {
+ serve.classification().then(res => {
this.productList = res.data
})
},
- getProductBrands(){
+ getProductBrands() {
this.brandIdList = []
- serve.getProductBrands().then(res=>{
- console.log(res)
- res.data.forEach(tab=>{
- this.brandIdList.push({value:tab.id,text:tab.brandName})
+ serve.getProductBrands().then(res => {
+ res.data.forEach(tab => {
+ this.brandIdList.push({
+ value: tab.id,
+ text: tab.brandName
+ })
})
-
+
})
},
- checkbox (e) {
- var index = e;//获取当前点击的下标
- var checkboxArr = this.radioItem;//选项集合
- // if (checkboxArr[index].checked) return;//如果点击的当前已选中则返回
- // checkboxArr.forEach(item => {
- // item.checked = false
- // })
- if(checkboxArr[index].checked ==false){
- checkboxArr[index].checked = true; //改变当前选中的checked值
-
- }else {
- checkboxArr[index].checked = false; //改变当前选中的checked值
- }
- if(checkboxArr[0].checked ==true){
- this.productDate.newMark = 1
- }else{
- this.productDate.newMark = 2
- }
- if(checkboxArr[1].checked ==true){
- this.productDate.recommend = 1
- }else{
- this.productDate.recommend = 2
- }
-
- },
- changeBox(e){
- let currentFlag = e.currentTarget.id;
- if(currentFlag == 'next'){
- this.$refs.productForm.validate().then(res=>{
- console.log('表单数据信息:', res);
- switch(currentFlag){
- case 'next':
- this.currentBoxId = 'instruction'
- break;
- case 'previous':
- this.currentBoxId = 'chooseType'
- break;
- default:
- this.currentBoxId = 'viewInstruction'
- break;
+ checkbox(e) {
+ var index = e; //获取当前点击的下标
+ var checkboxArr = this.radioItem; //选项集合
+ // if (checkboxArr[index].checked) return;//如果点击的当前已选中则返回
+ // checkboxArr.forEach(item => {
+ // item.checked = false
+ // })
+ if (checkboxArr[index].checked == false) {
+ checkboxArr[index].checked = true; //改变当前选中的checked值
+
+ } else {
+ checkboxArr[index].checked = false; //改变当前选中的checked值
+ }
+ if (checkboxArr[0].checked == true) {
+ this.productDate.newMark = 1
+ } else {
+ this.productDate.newMark = 2
+ }
+ if (checkboxArr[1].checked == true) {
+ this.productDate.recommend = 1
+ } else {
+ this.productDate.recommend = 2
+ }
+
+ },
+ changeBox(e) {
+ let currentFlag = e.currentTarget.id;
+ if (currentFlag == 'next') {
+ this.$refs.productForm.validate().then(res => {
+ switch (currentFlag) {
+ case 'next':
+ this.currentBoxId = 'instruction'
+ break;
+ case 'previous':
+ this.currentBoxId = 'chooseType'
+ break;
+ default:
+ this.currentBoxId = 'viewInstruction'
+ break;
}
- if(currentFlag == 'next'){
+ if (currentFlag == 'next') {
this.getAttributesType()
}
- }).catch(err =>{
- console.log('表单错误信息:', err);
- })
- }else{
- switch(currentFlag){
- case 'next':
- this.currentBoxId = 'instruction'
- break;
- case 'previous':
- this.currentBoxId = 'chooseType'
- break;
- default:
- this.currentBoxId = 'viewInstruction'
- break;
+ }).catch(err => {})
+ } else {
+ switch (currentFlag) {
+ case 'next':
+ this.currentBoxId = 'instruction'
+ break;
+ case 'previous':
+ this.currentBoxId = 'chooseType'
+ break;
+ default:
+ this.currentBoxId = 'viewInstruction'
+ break;
}
}
-
- },
- getAttributesType(){
- this.attributesTypeList = []
- serve.getAttributesType().then(res=>{
- res.data.forEach(tab=>{
+
+ },
+ getAttributesType() {
+ this.attributesTypeList = []
+ serve.getAttributesType().then(res => {
+ res.data.forEach(tab => {
this.attributesTypeList.push({
- value:tab.id,
- text:tab.name,
- number:tab.number,
- attributesList:tab.attributesList
+ value: tab.id,
+ text: tab.name,
+ number: tab.number,
+ attributesList: tab.attributesList
+ })
+ })
+ })
+ },
+ attributesData() {
+ this.bottonList = [{
+ marketPrice: '',
+ sellPrice: '',
+ stock: '',
+ integral: ''
+ }]
+ this.stockList = []
+ this.radioAttributes = ''
+ this.checkboxAttributes = []
+ if (this.productDate.attributesTypeId) {
+ this.attributesTypeList.forEach(tab => {
+ if (tab.value == this.productDate.attributesTypeId) {
+ this.attributesList = tab.attributesList
+ this.attributesList.forEach(tab => {
+ tab.attributesList = []
+ tab.attributeContent.split(',').forEach(item => {
+ tab.attributesList.push({
+ value: item,
+ text: item
+ })
+ })
})
+
+ }
+ })
+ } else {
+ this.attributesList = []
+ }
+
+ },
+ changeRadio(item, index) {
+ if (JSON.stringify(this.checkedList) == '[]') {
+ this.checkedList.push({
+ attributeId: item.id,
+ checked: this.radioAttributes
+ })
+ } else {
+ this.checkedList[index].checked = this.radioAttributes
+ }
+ this.stockCheck()
+ },
+ changeCheckBox(item, index) {
+ if (this.checkedList.length < index + 1) {
+ this.checkedList.push({
+ attributeId: item.id,
+ checked: this.radioAttributes
+ })
+ } else {
+ let checked = []
+ this.checkboxAttributes.forEach(tab => {
+ checked.push(tab)
})
- })
- },
- attributesData(){
- if(this.productDate.attributesTypeId){
- this.attributesTypeList.forEach(tab=>{
- if(tab.id = this.productDate.attributesTypeId){
- this.attributesList = tab.attributesList
- this.attributesList.forEach(tab=>{
- tab.attributesList = []
- tab.attributeContent.split(',').forEach(item=>{
- tab.attributesList.push({value:item,text:item})
- })
- })
-
- }
- })
- }else{
- this.attributesList = []
- }
-
- },
- changeRadio(item,index){
- if(JSON.stringify(this.checkedList) == '[]'){
- this.checkedList.push({attributeId:item.id,checked:item.attributeName})
- }else{
- this.checkedList[index].checked = item.attributeName
- }
- },
- changeCheckBox(item,index){
- if(this.checkedList.length{
- checked.push(tab)
- })
- this.checkedList[index].checked = checked.join(',')
- this.checkedList.checked
- }
- },
- deleteCheckAll(i){
- if(this.checkboxAttributes.length>1){
- this.checkboxAttributes.splice(i,1)
- }else{
- this.checkboxAttributes.splice(i,1)
- this.radioAttributes = ''
- }
- this.stockList.splice(i,1)
- },
- deleteRadio(){
- this.radioAttributes = ''
- },
- changeChecked(item){
- item.checked = !item.checked
- },
- addStockList(){
- this.stockList = []
- let obj = {
- marketPrice:'',
- sellPrice:'',
- stock:'',
- integral:''
- }
- if(this.attributesList.length ==1){
- let data = {}
- let name = this.attributesList[0].attributeName
- let value = this.radioAttributes
- data[name] = value
- obj.attributeJson = JSON.stringify(data)
- this.stockList.push(obj)
- }else{
- this.checkboxAttributes.forEach((tab,index)=>{
- let name = this.attributesList[0].attributeName
- let value = this.radioAttributes
- let tabName = this.attributesList[index+1].attributeName
- let tabValue = tab
- data[name] = value
- data[tabName] = tabValue
- obj.attributeJson = JSON.stringify(data)
- this.stockList.push(obj)
- })
-
- }
- },
- //调起上传图片
- srcFileImage() {
- let _that = this
+ this.checkedList[index].checked = checked.join(',')
+ this.checkedList.checked
+ }
+ this.stockCheck()
+ },
+ stockCheck() {
+ this.stockList = []
+ let obj = {
+ marketPrice: '',
+ sellPrice: '',
+ stock: '',
+ integral: ''
+ }
+ if (this.attributesList.length == 1) {
+ let data = {}
+ let name = this.attributesList[0].attributeName
+ let value = this.radioAttributes
+ data[name] = value
+ obj.attributeJson = JSON.stringify(data)
+ this.stockList.push(obj)
+ } else {
+ this.attributesList.forEach((item, ind) => {
+ if (ind != 0) {
+ this.checkboxAttributes.forEach((tab, index) => {
+ let data = {}
+ let tabName = this.attributesList[ind].attributeName
+ let tabValue = tab
+ data[tabName] = tabValue
+ obj.attributeJson = JSON.stringify(data)
+ let stockObj = JSON.parse(JSON.stringify(obj))
+ this.stockList.push(stockObj)
+ })
+ }
+ })
+
+
+ }
+ },
+ deleteCheckAll(i) {
+ if (this.checkboxAttributes.length > 1) {
+ this.checkboxAttributes.splice(i, 1)
+ } else {
+ this.checkboxAttributes.splice(i, 1)
+ this.radioAttributes = ''
+ }
+ this.stockList.splice(i, 1)
+ },
+ deleteRadio() {
+ this.radioAttributes = ''
+ },
+ changeChecked(item) {
+ item.checked = !item.checked
+ },
+ addStockList() {
+ this.stockList.forEach(tab => {
+ tab.marketPrice = this.bottonList[0].marketPrice
+ tab.sellPrice = this.bottonList[0].sellPrice
+ tab.stock = this.bottonList[0].stock
+ tab.integral = this.bottonList[0].integral
+ })
+ },
+ //调起上传图片
+ srcFileImage() {
+ let _that = this
let imageUrl = ''
- uni.chooseImage({
- count: 10, //默认9
- sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album'], //从相册选择
- success: function(res) {
- console.log(res)
- const JSESSIONID = utils.uuid()
- uni.uploadFile({
- url: 'http://uat.xingoil.com/adminapi/oil-oss/obejct/uploadFile',
- filePath: res.tempFilePaths[0],
- formData: {
- ossKey: 'xingyou',
- pathKey: 'publicxingyou',
- encrypt: 'PUBLIC',
- },
- name: 'file',
- header: {
- "Content-Type": "multipart/form-data",
- "Authorization": uni.getStorageSync('Authorization'),
- 'dataSources': 'MP',
- "imei": uni.getStorageSync('unionid'),
- "openId": uni.getStorageSync('openid'),
- 'JSESSIONID': JSESSIONID,
- 'token': utils.md5Salt(JSESSIONID)
- },
- success(e) {
- let obj = JSON.parse(e.data),
- imageUrl = obj.data.publicUrl
- _that.getImage(imageUrl)
- },
- fail(err) {
- }
- })
- },fail() {
- console.log('相机调用失败')
- }
- })
- },
- getImage(imageUrl){
- if(JSON.stringify(this.productDate.images) == '[]'){
- this.productDate.images.push({
- url:imageUrl,
- mainMark:1
- })
- }else{
- this.productDate.images.push({
- url:imageUrl,
- mainMark:''
- })
- }
- },
- setMainImage(index){
- this.productDate.images.forEach((tab,i)=>{
- if(i == index){
- tab.mainMark = 1
- }else{
- tab.mainMark = ''
- }
- })
- },
- clearImage(index){
- if(this.productDate.images[index].mainMark == 1){
- this.productDate.images.splice(index,1)
+ uni.chooseImage({
+ count: 10, //默认9
+ sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+ sourceType: ['album'], //从相册选择
+ success: function(res) {
+ const JSESSIONID = utils.uuid()
+ uni.uploadFile({
+ url: 'http://uat.xingoil.com/adminapi/oil-oss/obejct/uploadFile',
+ filePath: res.tempFilePaths[0],
+ formData: {
+ ossKey: 'xingyou',
+ pathKey: 'publicxingyou',
+ encrypt: 'PUBLIC',
+ },
+ name: 'file',
+ header: {
+ "Content-Type": "multipart/form-data",
+ "Authorization": uni.getStorageSync('Authorization'),
+ 'dataSources': 'MP',
+ "imei": uni.getStorageSync('unionid'),
+ "openId": uni.getStorageSync('openid'),
+ 'JSESSIONID': JSESSIONID,
+ 'token': utils.md5Salt(JSESSIONID)
+ },
+ success(e) {
+ let obj = JSON.parse(e.data),
+ imageUrl = obj.data.publicUrl
+ _that.getImage(imageUrl)
+ },
+ fail(err) {}
+ })
+ },
+ fail() {
+ console.log('相机调用失败')
+ }
+ })
+ },
+ getImage(imageUrl) {
+ if (JSON.stringify(this.productDate.images) == '[]') {
+ this.productDate.images.push({
+ url: imageUrl,
+ mainMark: 1
+ })
+ } else {
+ this.productDate.images.push({
+ url: imageUrl,
+ mainMark: ''
+ })
+ }
+ },
+ setMainImage(items, index) {
+ let obj = items
+ obj.mainMark = 1
+ this.productDate.images.splice(index, 1)
+ this.productDate.images.forEach((tab, i) => {
+ tab.mainMark = ''
+ })
+
+ this.productDate.images.unshift(obj)
+ },
+ clearImage(index) {
+ if (this.productDate.images[index].mainMark == 1) {
+ this.productDate.images.splice(index, 1)
this.productDate.images[0].mainMark = 1
- }else{
- this.productDate.images.splice(index,1)
+ } else {
+ this.productDate.images.splice(index, 1)
}
- },
- closed(){
- uni.navigateTo({
- url: '/pages/index/index'
- })
- },
- addCompleted(){
- if(this.radioItem[0].checked =true){
+ },
+ closed() {
+ uni.navigateTo({
+ url: '/pages/index/index'
+ })
+ },
+ addCompleted() {
+ if (this.radioItem[0].checked = true) {
this.productDate.newMark == '1'
- }else{
- this.productDate.newMark == '2'
- }
- if(this.radioItem[1].checked =true){
- this.productDate.recommend == '1'
- }else{
- this.productDate.recommend == '2'
- }
- this.productDate.checkedList = this.checkedList
- this.productDate.stockList = this.stockList
- serve.saveProduct(this.productDate).then(res=>{
- console.log(res)
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- this.closed()
- })
- }
+ } else {
+ this.productDate.newMark == '2'
+ }
+ if (this.radioItem[1].checked = true) {
+ this.productDate.recommend == '1'
+ } else {
+ this.productDate.recommend == '2'
+ }
+ this.productDate.checkedList = this.checkedList
+ this.productDate.stockList = this.stockList
+ serve.saveProduct(this.productDate).then(res => {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none'
+ })
+ this.closed()
+ })
+ }
}
}
+ }
+
+ .checked {
+ color: #FFFFFF;
+ background: #FE0606;
+ border: 1rpx solid #FE0606;
+ }
+
+ .checkbox checkbox {
+ display: none
+ }
+
+
+
+
+ .buttons {
+ width: 100%;
+ display: flex;
+ justify-content: space-evenly;
+ margin-top: 180rpx;
+
+ >view {
+ width: 250rpx;
+ height: 76rpx;
+ text-align: center;
+ line-height: 76rpx;
+ border-radius: 10rpx;
+ font-size: 28rpx;
+
+ &:nth-of-type(1) {
+ background: #FFFFFF;
+ border: 1rpx solid #B6B6B6;
+ color: #333;
+ }
+
+ &:nth-of-type(2) {
+ background: #FE0505;
+ color: #fff;
+ }
+ }
+ }
+
+ .show {
+ display: flex;
+ flex-wrap: wrap;
+ }
+
+ .hidden {
+ display: none;
+ }
+
\ No newline at end of file
diff --git a/packageIntegral/productList/index.vue b/packageIntegral/productList/index.vue
index 6a7a5dd..a1b0ed8 100644
--- a/packageIntegral/productList/index.vue
+++ b/packageIntegral/productList/index.vue
@@ -10,16 +10,15 @@
@click="selectOptions(index)">{{item.text}}({{item.count}})
-
+
@@ -29,7 +28,8 @@
库存:{{item.totalStock}}
{{statusEnum[item.auditStatus].value}}
+ :style="{background:statusEnum[item.auditStatus].color}">{{statusEnum[item.auditStatus].value}}
+