Browse Source

Merge pull request '包装发运添加扫码成功失败报警音' (#157) from feature_supplier into develop

Reviewed-on: #157
pull/158/head
wangxy 3 years ago
parent
commit
6642a84948
4 changed files with 19 additions and 0 deletions
  1. BIN
      src/assets/audio/成功音.mp3
  2. BIN
      src/assets/audio/报警音.mp3
  3. +9
    -0
      src/views/quality/component/shipmentCode.vue
  4. +10
    -0
      src/views/quality/pkg.vue

BIN
src/assets/audio/成功音.mp3 View File


BIN
src/assets/audio/报警音.mp3 View File


+ 9
- 0
src/views/quality/component/shipmentCode.vue View File

@ -15,6 +15,12 @@
@keyup.enter.native="enterPress"></el-input> @keyup.enter.native="enterPress"></el-input>
<el-button type="trimary" @click="resetCode" class="reset-code">重置扫描</el-button> <el-button type="trimary" @click="resetCode" class="reset-code">重置扫描</el-button>
</div> </div>
<audio ref="errAudio">
<source src="../../../assets/audio/报警音.mp3" type="audio/mpeg">
</audio>
<audio ref="successAudio">
<source src="../../../assets/audio/成功音.mp3" type="audio/mpeg">
</audio>
</div> </div>
</template> </template>
@ -53,6 +59,7 @@ export default {
} }
checkScancarpack(params).then(res => { checkScancarpack(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$refs.successAudio.play()
this.isSuccess = true this.isSuccess = true
this.newEmitObj = { this.newEmitObj = {
shipOrderId: this.shipOrderId, shipOrderId: this.shipOrderId,
@ -61,9 +68,11 @@ export default {
this.$emit('handleSuccessCode', this.newEmitObj) this.$emit('handleSuccessCode', this.newEmitObj)
} else { } else {
this.isSuccess = false this.isSuccess = false
this.$refs.errAudio.play();
} }
this.statusInfo = res.msg this.statusInfo = res.msg
}).catch(res => { }).catch(res => {
this.$refs.errAudio.play();
this.statusInfo = res.msg this.statusInfo = res.msg
this.isSuccess = false this.isSuccess = false
}) })


+ 10
- 0
src/views/quality/pkg.vue View File

@ -85,6 +85,12 @@
<el-button type="primary" @click="completeCreatePkg"> </el-button> <el-button type="primary" @click="completeCreatePkg"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<audio ref="errAudio">
<source src="../../assets/audio/报警音.mp3" type="audio/mpeg">
</audio>
<audio ref="successAudio">
<source src="../../assets/audio/成功音.mp3" type="audio/mpeg">
</audio>
</div> </div>
</template> </template>
<script> <script>
@ -232,6 +238,7 @@ export default {
// //
api.checkbarcode(code).then((res) => { api.checkbarcode(code).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$refs.successAudio.play()
if (res.data.InfoType === "doing") { // doing ! if (res.data.InfoType === "doing") { // doing !
this.$confirm(`是否要创建包装单`, '提示', { this.$confirm(`是否要创建包装单`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -252,7 +259,10 @@ export default {
} }
} else { } else {
this.msgError(res.msg) this.msgError(res.msg)
this.$refs.errAudio.play();
} }
}).catch(() => {
this.$refs.errAudio.play();
}) })
} }
this.isCodeInList = false this.isCodeInList = false


Loading…
Cancel
Save