Commit f7516e03 authored by jingnan's avatar jingnan 👀

调漆调配记录卡粘度没有有值的时候不从理论粘度截取

parent cd5666f6
...@@ -62,9 +62,9 @@ export default { ...@@ -62,9 +62,9 @@ export default {
immediate: true, immediate: true,
deep: true, deep: true,
handler: function(val) { handler: function(val) {
// 粘度里的杯根据理论粘度截取(从第一个“,“截取到第一个”杯“,有杯没有逗号的截取杯前的所有字符串) // this.cup没有值得时候粘度里的杯根据理论粘度截取(从第一个“,“截取到第一个”杯“,有杯没有逗号的截取杯前的所有字符串)
const splitFromBei = val && val.includes('杯') ? val.split('杯')[0] + '杯' : '' const splitFromBei = val && val.includes('杯') ? val.split('杯')[0] + '杯' : ''
if (splitFromBei) { if (splitFromBei && !this.cup) {
const str = splitFromBei.includes(',') || splitFromBei.includes(',') ? splitFromBei : (',' + splitFromBei) const str = splitFromBei.includes(',') || splitFromBei.includes(',') ? splitFromBei : (',' + splitFromBei)
const formatVal = str.replace(/,/g, ',') const formatVal = str.replace(/,/g, ',')
const regex = new RegExp(`,(.*?)杯`) const regex = new RegExp(`,(.*?)杯`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment