master
toesbieya 6 years ago
parent aed701c2ec
commit 8cb4d32cd9
  1. 4
      vue/src/assets/styles/variables.scss
  2. 2
      vue/src/components/Skeleton/index.vue
  3. 2
      vue/src/config/index.js
  4. 4
      vue/src/utils/file.js
  5. 8
      vue/src/views/purchase/inbound/components/EditDialog.vue
  6. 4
      vue/src/views/sell/order/components/EditDialog.vue
  7. 12
      vue/src/views/sell/outbound/components/EditDialog.vue

@ -20,8 +20,8 @@ $--color-gray: #9E9E9E;
$--color-blue-gray: #607D8B; $--color-blue-gray: #607D8B;
//覆盖element颜色 //覆盖element颜色
$--color-primary: $--color-blue; $--color-primary: #1890ff;
$--color-success: $--color-green; $--color-success: #21BA45;
$--color-warning: $--color-deep-orange; $--color-warning: $--color-deep-orange;
$--color-danger: $--color-red; $--color-danger: $--color-red;
$--color-info: $--color-teal; $--color-info: $--color-teal;

@ -32,7 +32,7 @@
(animation !== 'none' ? ` q-skeleton--anim-${animation}` : '') + (animation !== 'none' ? ` q-skeleton--anim-${animation}` : '') +
(square === true ? ' q-skeleton--square' : '') + (square === true ? ' q-skeleton--square' : '') +
(bordered === true ? ' q-skeleton--bordered' : '') + (bordered === true ? ' q-skeleton--bordered' : '') +
(className !== undefined ? ' '+className : '') (className !== undefined ? ' ' + className : '')
return h(tag, { return h(tag, {
staticClass: 'q-skeleton', staticClass: 'q-skeleton',

@ -31,5 +31,5 @@ module.exports = {
attachmentPrefix: 'https://static.toesbieya.cn/', attachmentPrefix: 'https://static.toesbieya.cn/',
//省市地区json数据请求地址 //省市地区json数据请求地址
regionDataUrl:'/static/json/region-pca.json' regionDataUrl: '/static/json/region-pca.json'
} }

@ -1,5 +1,5 @@
import request from '@/config/request' import request from '@/config/request'
import {attachmentUploadUrl,attachmentPrefix} from '@/config' import {attachmentUploadUrl, attachmentPrefix} from '@/config'
import {isEmpty, timeFormat} from "@/utils" import {isEmpty, timeFormat} from "@/utils"
const baseUrl = '/file' const baseUrl = '/file'
@ -47,6 +47,6 @@ export function upload(blob, filename = '快照.png') {
//自动补全附件链接前缀 //自动补全附件链接前缀
export function autoCompleteUrl(url) { export function autoCompleteUrl(url) {
if (isEmpty(url)) return '' if (isEmpty(url)) return ''
if (['http','https'].some(i=>url.startsWith(i))) return url if (['http', 'https'].some(i => url.startsWith(i))) return url
return attachmentPrefix + url return attachmentPrefix + url
} }

@ -64,7 +64,7 @@
v-model="row.num" v-model="row.num"
:min="0" :min="0"
size="small" size="small"
@change="changeInboundNum($event,row)" @change="(nv,ov)=>changeInboundNum(nv,ov,row)"
/> />
<span v-else>{{row.num}}</span> <span v-else>{{row.num}}</span>
</template> </template>
@ -128,10 +128,10 @@
num: i.remain_num num: i.remain_num
})) }))
}, },
changeInboundNum(v, row) { changeInboundNum(nv, ov, row) {
let parentSub = this.parentSubList.find(i => i.cid === row.cid) let parentSub = this.parentSubList.find(i => i.cid === row.cid)
if (!parentSub || v > parentSub.remain_num) { if (!parentSub || nv > parentSub.remain_num) {
return elAlert(`${row.cname}的入库数量超出采购数量`, () => row.num = parentSub.remain_num) return elAlert(`${row.cname}的入库数量超出采购数量`, () => row.num = ov)
} }
}, },
validate() { validate() {

@ -126,7 +126,7 @@
customer_name: null, customer_name: null,
finish: 0, finish: 0,
ftime: null, ftime: null,
total:0 total: 0
}, },
rules: { rules: {
customer_name: [{required: true, message: '客户不能为空', trigger: 'change'}] customer_name: [{required: true, message: '客户不能为空', trigger: 'change'}]
@ -174,7 +174,7 @@
if (isEmpty(sub.price)) return `${index + 1}个商品单价不能为空` if (isEmpty(sub.price)) return `${index + 1}个商品单价不能为空`
if (sub.num < 0 || !isInteger(sub.num)) return `${index}个商品数量有误` if (sub.num < 0 || !isInteger(sub.num)) return `${index}个商品数量有误`
if (sub.price <= 0 || !isInteger(sub.price)) return `${index}个商品单价有误` if (sub.price <= 0 || !isInteger(sub.price)) return `${index}个商品单价有误`
this.form.total=plus(this.form.total,mul(sub.num, sub.price)) this.form.total = plus(this.form.total, mul(sub.num, sub.price))
index++ index++
} }
return null return null

@ -69,7 +69,7 @@
v-model="d.row.num" v-model="d.row.num"
:min="0" :min="0"
size="small" size="small"
@change="changeOutboundNum($event,d.row,row)" @change="(nv,ov)=>changeOutboundNum(nv,ov,d.row,row)"
/> />
<span v-else>{{d.row.num}}</span> <span v-else>{{d.row.num}}</span>
</template> </template>
@ -208,9 +208,9 @@
return sum return sum
} }
}, },
changeOutboundNum(v, row, displayTableRow) { changeOutboundNum(nv, ov, row, displayTableRow) {
if (v > row.max_num) { if (nv > row.max_num) {
return elAlert(`${row.cname}的出库数量超出库存数量`, () => row.num = row.max_num) return elAlert(`${row.cname}的出库数量超出库存数量`, () => row.num = ov)
} }
let outboundNum = displayTableRow.data.map(i => i.num) let outboundNum = displayTableRow.data.map(i => i.num)
@ -219,10 +219,10 @@
if (!outboundNum) return if (!outboundNum) return
if (outboundNum > displayTableRow.remain_num) { if (outboundNum > displayTableRow.remain_num) {
let correctNum = sub(displayTableRow.remain_num, sub(outboundNum, v)) let correctNum = sub(displayTableRow.remain_num, sub(outboundNum, nv))
if (correctNum < 0) correctNum = 0 if (correctNum < 0) correctNum = 0
else if (correctNum > row.max_num) correctNum = row.max_num else if (correctNum > row.max_num) correctNum = row.max_num
return elAlert(`${displayTableRow.cname}的出库数量超出销售数量`, () => row.num = correctNum) return elAlert(`${displayTableRow.cname}的出库数量超出销售数量`, () => row.num = ov)
} }
}, },
validate() { validate() {

Loading…
Cancel
Save